03-02-2008, 11:29 AM
|
#9 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Why not use stream_context_create ??
php Code:
$url = 'http://www.tibia.com/logging/url'; // The URL to the accountmanagement page$f1 = 'accnr'; // Name of field1(ON THE WEBSITE YOU'RE TRYING TO LOGIN ON!)$f2 = 'pass'; // Name of field2(ON THE WEBSITE YOU'RE TRYING TO LOGIN ON!)$v1 = $_POST[ 'acc']; // Value of field1(FROM THE WEBSITE YOU'RE TRYING TO LOGIN FROM!)$v2 = $_POST[ 'pw']; // Value of field2(FROM THE WEBSITE YOU'RE TRYING TO LOGIN FROM!)$find = 'Welcome to your account'; // String to search for in the page you've logged in on$postchars = http_build_query ( array($f1 => $v1, $f2 => $v2) ); $stream = stream_context_create( array('http' => array('method' => 'POST', 'header' => 'Content-Type: application/x-www-form-urlencoded', 'content' => htmlspecialchars_decode ( $postchars ) ) ) ); // Creates an array of the sourcecode, and inputs the values of the field1 and field2$content = file_get_contents($url, false, $stream); // Gets the sourcecode from the new page that is loaded after the input of the values.$search = strpos($content, $find); // Search the sourcecode for the specific string in the variable "find"if($search === false){echo 'The login seems to be incorrect. Please try again, or check if you have a valid account'; } // If the string wasn't foundelse {echo 'Your account is valid!'; } // If the string was found
__________________
|
|
|
|