0
I wish to log in to different pages with Curl
and make sure everything’s okay.
Example: login done successfully returns me a text the "login ok" screen if it didn’t work takes some element of the error page and prints me on the screen below the "login error" panel (I will use to test proxys and create chat bots further forward). As an example I tried to make a simple code on Facebook, follows 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 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 list tester:
192.173.0.1 Live
192.168.0.2 die
192.168.0.4 Live