I want to log in to different pages with Curl
and see if everything is OK.
Example: login successfully returns a text to the screen "login ok" if it did not work take some element of the error page and me printa in the screen under the "login error" panel (I will use to test proxys and create chat bots more front). As an example I tried to make a simple code on Facebook, below:
<?php
$login_email = '[email protected]';
$login_pass = 'minhasenha';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://m.facebook.com/login.php');
curl_setopt($ch, CURLOPT_POSTFIELDS,'charset_test=€,´,€,´,水,Д,Є&email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
$fbMain = curl_exec($ch)
?>
The problem is that after this simple login system I do not know how to print down the status that tells me whether the login was successfully done or not, example of what I want to do more with Proxy Tester list:
192.173.0.1 Live
192.168.0.2 die
192.168.0.4 Live