403 error on a site...

Help
James
2004-10-01
2013-05-30
  • James

    James - 2004-10-01

    Hi,
    Basically I'm trying to access this site:
    http://sws2b.dyndns.org:1124/forums/index.php
    with Snoopy, however every attempt I try results in a 403 error.
    Here's an example of the code I'm using:
    <?php
    include "Snoopy.class.php";
        $snoopy = new Snoopy;
       
        $snoopy->maxframes = 5;
       
    //stuff
        $snoopy->agent = "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)";
        $snoopy->referer = "http://www.microsnot.com/";
       
        $snoopy->port = 1124;
       
        $snoopy->rawheaders["Pragma"] = "no-cache";
       
        $snoopy->maxredirs = 2;
        $snoopy->offsiteok = false;
        $snoopy->expandlinks = false;
       
        $snoopy->user = "joe";
        $snoopy->pass = "bloe";
       
    //end of stuff

        if($snoopy->fetch("http://sws2b.dyndns.org:1124/forums/index.php"))
        {
            echo "<PRE>".htmlspecialchars($snoopy->results)."</PRE>\n";
        }
        else
            echo "error fetching document: ".$snoopy->error."\n";
    ?>

    It's possible the guy has some kind of PHP block, but since my intentions are good (I'm trying to give all the members 5MB webspace... long story :p) I'd be pleased if you could help! :)
    Thanks,
    Jim

     
    • Auzzie

      Auzzie - 2004-10-15

      if($snoopy->fetch("http://sws2b.dyndns.org:1124/forums/index.php";))

      the only thing obvious i see is that ; there inside an if statment. That will make it behave strangly. However, that might not be the problem.

      Sometimes a site needs to set a cookie, and/or make a session, before it will let you login, try having a normal fetch before you set the username and password, and then Snoopy should have any sessions and cookies.

      Or your IP might have been blocked for trying to access the page incorrectly :)

      -auz

       
    • Gene Wood

      Gene Wood - 2004-10-16

      The microsnot referrer might cause it as well as your username password that your sending and the super old (MSIE 4.0) user agent you're sending.

      I copied and pasted your values into my own installation and tried it and it worked fine.

      Is it still occuring?

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks