Snooped website returns no error or result

Help
wuxl
2007-02-17
2013-05-30
  • wuxl
    wuxl
    2007-02-17

    Please can you help me:

    I am trying to fetch the website www.politie.nl/Gooi_en_Vechtstreek/ but when I run the script the response is this error:

    Warning: Variable passed to each() is not an array or object in /home/homedeal/domains/inheiloo.nl/public_html/snoop.php on line 11

    With other URLs the script works well. Does anyone know what the cause of this response is. And how to solve ?

    The code used is:

    <?php
    include "Snoopy.class.php";
    $snoopy = new Snoopy;
    $snoopy->agent = "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)";
    $snoopy->referer = "";
    $snoopy->fetch("http://www.politie.nl");

    if ($snoopy->fetch("http://www.politie.nl/Gooi_en_Vechtstreek/")){
        echo $snoopy->results;
        while (list($key,$val) = each($snoopy->headers)) echo $key.": ".$val."<br/>\n";
    }else{
        echo "no fetch";
    }
    ?>