cUrl working unpredictable (connect failed)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R4

    #1

    cUrl working unpredictable (connect failed)

    Hi,

    I'm working with cUrl and I'm getting strange results. When I run the
    following script, most of the time I get the error "connect() failed" but
    sometimes it works and returns the requested page???

    <?php
    $myCurl = curl_init("www. whatever.com");
    if(!$myCurl)
    echo curl_error($myC url);
    else
    {
    $result = curl_exec($myCu rl);
    if(!$result) echo curl_error($myC url);
    curl_close($myC url);
    }
    ?>

    I'am working with PHP 4.0.6 and libcurl 7.9.3.


Working...