From: "Tommy Pham" on
> -----Original Message-----
> From: ioannes(a)btinternet.com [mailto:ioannes(a)btinternet.com]
> Sent: Wednesday, April 28, 2010 7:03 AM
> To: 'PHP'
> Subject: Re: [PHP] CURL cannot connect to URL - IP address - after
successful
> connection
>
> I think the answer is: ISPs have a different range of addresses from host
> providers, so it is possible to block requests from host servers, so from
> scripts.
>
> John
>

That's possible but very unlikely in your case. Since you were to able to
get the necessary information on the 1st request, but failed on subsequent
means it has an anti-bot mechanism in place. Bypassing anti-bot requires
in-depth reverse-engineering of the targeted site.

Regards,
Tommy

From: "Gary ." on
On 4/25/10, ioannes(a)btinternet.com wrote:
> I can return a target page - once, but then on refresh within a few
> hours the script curl_error is that it cannot connect to the host and
> return is empty.

Failed to connect to host is a pretty strange error if they're doing
anything regarding cookies and so on, IMO - I think I'd expect at
least a connection to be established before they decide they don't
like you. Have you used curl's --trace & --trace-ascii options?
From: "Gary ." on
On 4/29/10, ioannes(a)btinternet.com wrote:
> On 2010/04/29 19:46, Gary . wrote:
>> Failed to connect to host is a pretty strange error if they're doing
>> anything regarding cookies and so on, IMO - I think I'd expect at
>> least a connection to be established before they decide they don't
>> like you. Have you used curl's --trace& --trace-ascii options?
>
> Is that debug_backtrace() in php

Not sure :-P

> as I am not using the command line
> (can't work out how to get the window up having downloaded curl, I am
> not up to 'building libraries' that seems to be needed).

Windows? http://curl.haxx.se/download.html *n*x variants should allow
installing via their packge management systems.
From: Pete Ford on
On 25/04/10 14:17, ioannes(a)btinternet.com wrote:
> I can return a target page - once, but then on refresh within a few
> hours the script curl_error is that it cannot connect to the host and
> return is empty. The target URL is an ip address, not a named url, so
> maybe it has something to do with DNS. I am on a shared server. Any
> ideas on why this happens?
>
> John

I've been watching this thread for a few days, and seen the various responses.
It seems to me you should be asking the provider of the target page what the
problem is! If you are consuming this service legitimately then they will tell
you, and possibly provide a workaround. If not, then you probably shouldn't be
doing what you are trying to do anyway - there a reason why they are blocking
bots...

Cheers
Pete