cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Problem url

From: Broekhuis,Robert R. <BROEKHRR_at_airproducts.com>
Date: Thu, 22 Dec 2005 14:13:28 -0500

I have an application using cURL that works great - almost always. But
there are occasional hiccups, and my knowledge of http isn't good enough
to figure out why. The following is my code to retrieve a page:

$ch=curl_init();
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.1; .NET CLR 1.1.4322)");
curl_setopt($ch,CURLOPT_URL,"http://www.tomdattorney.com/");
curl_setopt($ch,CURLOPT_HTTPHEADER,array(
    "Accept: image/gif, image/x-xbitmap, image/jpeg, image/png, */*",
    "Accept-Language: en",
    "Accept-Charset: iso-8859-1,*,utf-8"));
curl_setopt($ch,CURLOPT_TIMEOUT,20);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
$page=curl_exec($ch);

Works for 999 out of 1000 urls - but for the one here
(tomdattorney.com), which loads just fine into my browser, it just sits
there and times out. The curlopt_httpheader setting above reflects just
one of my attempts to help things along - no such luck. The
followlocation setting likewise doesn't matter. What am I missing?
Thanks for any help you can provide
Rob

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-12-22