Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

error fetching document: connection failed (1

Help
2008-10-30
2013-05-30
  • JM Engineering
    JM Engineering
    2008-10-30

    Hi everyone, I have a newbie problem.  Fetch does not work on exteral websites and gives a "error fetching document: connection failed (110)".  It does however work on pages internal to the site.  Any help would be appreciated.

    Best regards,
    John

    http://canadadiamonds.com/test.php

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <?
        include "Snoopy.class.php";
        $snoopy = new Snoopy;
       
        $snoopy->user = "joe";
        $snoopy->pass = "bloe";
       
        if($snoopy->fetch("http://www.slashdot.org/"))
        {
            echo "response code: ".$snoopy->response_code."<br>\n";
            while(list($key,$val) = each($snoopy->headers))
                echo $key.": ".$val."<br>\n";
            echo "<p>\n";
           
            echo "<PRE>".htmlspecialchars($snoopy->results)."</PRE>\n";
        }
        else
            echo "error fetching document: ".$snoopy->error."\n";

    ?>
    </body>
    </html>