Forum Moderators: coopster
[codes]
<?php
$link= 'http://www.example.com';
$content=file_get_contents($link);
echo $content;
?>
[/codes]
I tried the code with these links:
1. http://www.example.com (...worked OK. Also tried google.com, yahoo.com,... all OK.)
2. http://www.example.com/buy/chess (...$content captured an error page instead of the result)
3. http://www.example.com/chessmotifs (...$content returned nil, ... totally nothing. This is the one I need the code to work btw.)
Could this be because the site (in this case cafepress) uses some sort of scripts to generate their sub-pages?
If yes, is there an alternatif method to "file_get_contents" that allows a page to generate fully before capturing?
Thanks for your advise!
[edited by: dreamcatcher at 1:59 pm (utc) on July 4, 2007]
[edit reason] Use example.com, thanks. [/edit]
Could this be because the site (in this case cafepress) uses some sort of scripts to generate their sub-pages?
If yes, is there an alternatif method to "file_get_contents" that allows a page to generate fully before capturing?
It could be due to a number of reasons. Since it is a dynamic page, you might be losing some of the parameters or inputs.