Login facebook

Author: 48e22b53e7

26 June 2019

Views: 215

$headers = [
"User-agent: Opera/9.80 (J2ME/MIDP; Opera Mini/4.0.10992/35.5561; U; hr) Presto/2.8.119 Version/11.10",
"Host: m.facebook.com",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip",
"Connection: keep-alive",
"Upgrade-Insecure-Requests: 1"
];

$options = [
CURLOPT_HEADER => 1,
CURLINFO_HEADER_OUT => 1
];

$facebook = new httpConnect('https://m.facebook.com/');

$facebook->setHeaders($headers);

$facebook->setOptions($options);

$facebook->sendRequest();

$info = $facebook->getInformations();

$sourceCode = $facebook->getResponse();

preg_match('/action="(.*?)"/', $sourceCode, $action);

preg_match('/<input type="hidden" name="lsd" value="(.*?)" autocomplete="off" />/', $sourceCode, $lsd);

preg_match('/<input type="hidden" name="jazoest" value="(.*?)" autocomplete="off" />/', $sourceCode, $jazoest);

preg_match('/<input type="hidden" name="m_ts" value="(.*?)" />/', $sourceCode, $m_ts);

preg_match('/<input type="hidden" name="li" value="(.*?)" />/', $sourceCode, $li);

$data = [
'lsd' => $lsd[1],
'jazoest' => $jazoest[1],
'm_ts' => $m_ts[1],
'li' => $li[1],
'try_number' => '0',
'unrecognized_tries' => '0',
'email' => 'email',
'pass' => 'password',
'login' => 'Log In',
'_fb_noscript' => 'true'
];

$options = [
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => $data,
CURLINFO_HEADER_OUT => false,
CURLOPT_FOLLOWLOCATION => TRUE
];

$headers = [
"Host: m.facebook.com",
"User-Agent: Opera/9.80 (J2ME/MIDP; Opera Mini/4.0.10992/35.5561; U; hr) Presto/2.8.119 Version/11.10",
"Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip",
"Referer: https://m.facebook.com",
"Content-Type: application/x-www-form-urlencoded",
"Connection: keep-alive",
"Upgrade-Insecure-Requests: 1",
];

$post = htmlspecialchars_decode(urldecode('https://m.facebook.com'.$action[1]));

$facebook = new httpConnect($post);

$facebook->setHeaders($headers);

$facebook->setOptions($options);

$facebook->sendRequest();

$info = $facebook->getInformations();

echo $facebook->getResponse():


Edit Code:

Please enter an edit code

Edit codes must be at least 20 characters

Share