Re: Can a website block the use of file_get_contents ?



On Mar 28, 3:03 am, postseb <post...@xxxxxxxxx> wrote:

Can a website block the use of file_get_contents ?

I've seen this happen (in particular when trying to read data off of
ASP-based Web sites), although I don't know why it happens. Either
PHP file system functions generate weird HTTP request headers or some
HTTP servers generate weird response headers...

Example : file_get_contents("http://www.google.com";) works fine, but
file_get_contents("http://www.petitscailloux.com/Follow.aspx?
sUrl=http://www.seloger.com/199986/16271207/detail.htm";) does not.

Any clues or ways to circumvent ?

Use cURL of write a data retrieval function using sockets:

http://groups.google.com/group/comp.lang.php/msg/51ae1757ad369ace

Cheers,
NC
.