Jump to content

file_get_contents problem


drisate

Recommended Posts

Hey guys i am trying to extract the HTML of a loop of links. Each links are diffrent pages and i manualy cheked and there all diffrent ... but for some reason, the loop always sends back the same html ... the one from the first loop.

 

while($i<=3){
  echo file_get_contents("http://www.amazon.com/s/ref=nb_sb_noss_1/187-7591397-0314036?url=search-alias%3Dvideogames&field-keywords=ps3#/ref=sr_pg_$i?rh=n%3A468642%2Ck%3Aps3+game&page=$i&d=1&keywords=ps3+game&ie=UTF8&qid=1333219791");
echo "<hr>";
  $i++;
}

 

Normaly i should get page 1 2 3 ... but i get 3 times the page 1 ... the URL is good because if i manualy open them the content is diffrent in each page

Link to comment
https://forums.phpfreaks.com/topic/260094-file_get_contents-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.