Advertisement
Guest User

Untitled

a guest
Jun 26th, 2011
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. <?
  2. $chh = curl_init("https://mobile.twitter.com/session");
  3. curl_setopt($chh, CURLOPT_HEADER, 0);
  4. curl_setopt($chh, CURLOPT_POST, 1);
  5. curl_setopt($chh, CURLOPT_RETURNTRANSFER, 1);
  6. $q = curl_exec($chh);
  7. preg_match_all("/authenticity_token\" type=\"hidden\" value=\"([^\"]+)/i", $q, $p);
  8. preg_match('/Set-Cookie: (.*)\b/', $q, $cookie);
  9. print_r($cookie);
  10. print_r($p);
  11.  
  12.  
  13. $post = $p[1][0];
  14.  
  15.  
  16. $ch = curl_init("https://mobile.twitter.com/session");
  17. curl_setopt($ch, CURLOPT_HEADER, 0);
  18. curl_setopt($ch, CURLOPT_POST, 1);
  19. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  20. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
  21. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  22. curl_setopt($ch, CURLOPT_POSTFIELDS, "authenticity_token=".$post."&username=".rawurlencode("_mariahrocha_")."&password=".rawurlencode("11.08.95")."");
  23. $output = curl_exec($ch);
  24. curl_close($ch);
  25. echo $output;
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement