Am Using a Cron Job (Php script) to extract the loto results on the day of the draw from:
http://www.millipiyango.gov.tr/sonuclar/_cs_sayisal.php
the script i am using is by reading the file, then breaking it into lines to find the numbers: as below:
$rfile = "http://www.millipiyango.gov.tr/sonuclar/_cs_sayisal.php";
$lines = file($rfile);
foreach ($lines as $line_num => $line) {
echo "Line #<b>{$line_num}</b> : " .htmlspecialchars($line) . "<br />\n";
}
The Surprise is that the output of the page (That you see online) is not like the source (When PHP read the file)!!
I tried "Select all" by mouse, and reading "View Selection Source {Firefox}) it worked.
But I need it done by Cron Job.
How can I read the source? it seems the code is hidden using jquery.
The actual data is gathered from http://www.millipiyango.gov.tr/sonuclar/cekilisler/sayisal/20141115.json which seems in the format [year][month][day].json
You can use
json_decodein php to get an array with values, which you can then use to do whatever you want.If you want to see all available data you could do the following: