Basically I'm trying to access this site:
with Snoopy, however every attempt I try results in a 403 error.
Here's an example of the code I'm using:
$snoopy = new Snoopy;
$snoopy->maxframes = 5;
$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
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! :)
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 :)
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?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.