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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.