Unfortunately, after research I still couldn't find the answer for my issue. The issue is that I cannot print data from multiple pages. Data is printed only once. Perhaps I am missing silly mistake here, which you could help me find it.
$cycles=10;
$listValue=0;
for ($cy = 0; $cy < $cycles; $cy++){
$html = file_get_contents("http://www.website.com/rate/today.aspx?d=02.03.2015&r=". $listValue ."01&c=#");
$dom = new DOMDocument;
@$dom->loadHTML($html);
$tables = $dom->getElementsByTagName('td');
$data = array();
while($table = $tables->item($i++))
{
//stuff
}
foreach($data as $item)
{
echo "Rank - " . $item['rank'] . "</br>";
}
$listValue++;
echo $listValue."<br>";
}
So basically, I am able to print data only of first page.