Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $chh = curl_init("https://mobile.twitter.com/session");
- curl_setopt($chh, CURLOPT_HEADER, 0);
- curl_setopt($chh, CURLOPT_POST, 1);
- curl_setopt($chh, CURLOPT_RETURNTRANSFER, 1);
- $q = curl_exec($chh);
- preg_match_all("/authenticity_token\" type=\"hidden\" value=\"([^\"]+)/i", $q, $p);
- preg_match('/Set-Cookie: (.*)\b/', $q, $cookie);
- print_r($cookie);
- print_r($p);
- $post = $p[1][0];
- $ch = curl_init("https://mobile.twitter.com/session");
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "authenticity_token=".$post."&username=".rawurlencode("_mariahrocha_")."&password=".rawurlencode("11.08.95")."");
- $output = curl_exec($ch);
- curl_close($ch);
- echo $output;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement