Re: Can a website block the use of file_get_contents ?
- From: "C. (http://symcbean.blogspot.com/)" <colin.mckinnon@xxxxxxxxx>
- Date: Fri, 28 Mar 2008 05:56:18 -0700 (PDT)
On 28 Mar, 10:03, postseb <post...@xxxxxxxxx> wrote:
Can a website block the use of file_get_contents ?
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 ?
Well, its not a valid URL for starters - you should urlencode
everything after the 'sURL=' and lose the white space in front.
If that still does not work, try using curl with a faked user agent -
maybe they serve up different content to different browsers.
But beware - if the remote site has anti-leech functionality you
should respect the publishers constraints.
C.
.
- References:
- Can a website block the use of file_get_contents ?
- From: postseb
- Can a website block the use of file_get_contents ?
- Prev by Date: Re: Need help with PHP + MySQL on W2k
- Next by Date: Re: how to access OpenOffice Writer (For mailmerge)
- Previous by thread: Re: Can a website block the use of file_get_contents ?
- Next by thread: Re: Can a website block the use of file_get_contents ?
- Index(es):
Relevant Pages
|