Good day to all, the second time today is 8-)

There is a site falling phobos soil . The site has a right side telemetry, but the data in the source code of the page is not displayed. 2-3 topics back I was already interested in how to read data from a third-party site, which I wanted to apply to this, but I can not.

Explain how to count telemetry? I want to read something in a sort of every 10 seconds to read the value from another site, and write it to a table, or every time you update the data. This thing should fall in 2-3 weeks, so that I would like to consider telemetry before this date.

PS The maximum that I got to the bottom is the classes that go to the n2yo1000.js script

    2 answers 2

    That's right, the whole thing is in /js/n2yo10.js , there it goes at the beginning of the file:

     $(document).ready( function() { // ... var r = Math.random() * Date.parse(new Date()); // satlist на данный момент 37872 var url = "http://"+window.location.hostname+"/sat/jtest.php?s="+satlist+"&r="+r; $.getJSON(url, function(data){ sArray=data; // ... populateInstantTrk(); durID = setInterval ("populateInstantTrk()", DURATION*1000); } ); // ... }); 

    Then the whole thing happens in populateInstantTrk()

     function populateInstantTrk() { var r = Math.random() * Date.parse(new Date()); var url = "http://" +window.location.hostname +"/sat/instant-tracking.php?s="+satlist +"&hlat="+homeLat+"&hlng="+homeLng+"&d="+DURATION +"&r="+r+"&tz=" + intTimezone_now_tzstring; // Тут в конце концов получается что-то типа: // http://n2yo.com/sat/instant-tracking.php?s=37872&hlat=55.755786&hlng=37.617633&d=300&r=1301027283608.8657&tz=GMT+04:00 $.getJSON(url, function(data){ // тут мы все данные выводим }); } 

    Actually, no miracles are usual requests, another thing is that from your javascript it may not go, as this is a javascript cross site ajax, and there are some limitations

    • namely, one cannot make ajax requests to another domain: D - Zowie
    • So the question is not about what to use this data on the site, but what you need to do to get this data in your php-script with the subsequent recording of all data in the database. A person has a question - how to get this data, the actual answer - a list of URLs for which you can get data - chernomyrdin
     file_get_content(http://n2yo.com/?s=37872); 

    and from there you pull out the table you need, it is in

     <div id="paneldata" style="visibility: hidden"> <table>*****</table> </div> 
    • file_get_content is like php .... and how does the web server on which the site respond to frequent calls to it, for example, if you take it not once every 10 seconds, and once every 1-2 seconds? - stasych
    • yes php How often to take the information is you decide, at least once per hour. Yes, there is a normal server to it every second by 1K come. it's just that if something falls there, you just simply won't get the information through the function, that's all. - Artem