[PHP] Neopets Login Help
This is the code.
Its being used in conjunction with the UGS Framework.
But everytime I log in, with correct details, it wont return the details as valid. Always invalid.
Wondering if anyone can help me.
Nobody is on MSN so i cant ask them.
Thanks
function neologin($Username, $Password)
{
// Basic check
if($Username == null || $Password == null)
{
print "ERROR: Your must enter a username or password.\n";
return false;
}
// Navigate to neopets
$html = $this->httpClient->HTTPRequest('GET', 'http://www.neopets.com/loginpage.phtml', null, array());
$postData1 = 'destination=%2Findex.phtml&username='.$Username. '&x=0&y=0';
$html = $this->httpClient->HTTPRequest('POST', 'http://www.neopets.com/hi.phtml', $postData1, array("Referer" => "http://www.neopets.com/loginpage.phtml"));
$postdata2 = 'destination=%2Findex.phtml&username='.$Username.'&password='.$Password.'&x=0&y=0';
$html = $this->httpClient->HTTPRequest('POST','http://www.neopets.com/login.phtml?',$postdata2,array('Referer' => 'http://www.neopets.com/hi.phtml'));
// Return
//return (strpos($html, 'Logout') <> 0) ? true : false;
return($pos = strrpos($html, "Logout") <> 0) ? true : false;
}Its being used in conjunction with the UGS Framework.
But everytime I log in, with correct details, it wont return the details as valid. Always invalid.
Wondering if anyone can help me.
Nobody is on MSN so i cant ask them.
Thanks
