This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 7th, 2011  |  syntax: PHP  |  size: 1.78 KB  |  views: 416  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $m = rand(111111,999999);
  3. $url = "https://mid.live.com/si/login.aspx";
  4. $login = "LOGIN@hotmail.com";
  5. $password = "PASSWORD";
  6. $campo = array(
  7.             'LoginTextBox'=>urlencode($login),
  8.             'PasswordTextBox'=>urlencode($password),
  9.             'SavePasswordCheckBox'=>0,
  10.             'PasswordSubmit'=>'Sign in',
  11.         );
  12. $cookie_file_path = "./cookie.txt";
  13. foreach($campo as $key=>$value) { $campo_string .= $key.'='.$value.'&'; }
  14. rtrim($campo_string,'&');
  15. $ch = curl_init();
  16. curl_setopt($ch, CURLOPT_URL,$url);
  17. curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  18. // curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
  19. curl_setopt ($ch, CURLOPT_USERAGENT, "{$_SERVER['HTTP_USER_AGENT']}");
  20. curl_setopt ($ch, CURLOPT_REFERER, 'https://mid.live.com/si/login.aspx?__ufps=$m');  
  21. // curl_setopt($ch,CURLOPT_POST,count($campo));
  22. // curl_setopt($ch,CURLOPT_POSTFIELDS,$campo_string);
  23. // curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
  24. // curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  25. $result = curl_exec($ch);
  26. curl_close($ch);
  27. // echo $result;
  28. $pattern = '/login.aspx.__ufps=(.*)#/';
  29. preg_match_all($pattern,$result,$matches);
  30. $m = $matches[1][0];
  31. $url = "https://mid.live.com/si/login.aspx?__ufps=$m";
  32. $ch = curl_init();
  33. curl_setopt($ch, CURLOPT_URL,$url);
  34. curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  35. curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
  36. curl_setopt ($ch, CURLOPT_USERAGENT, "{$_SERVER['HTTP_USER_AGENT']}");
  37. curl_setopt ($ch, CURLOPT_REFERER, 'https://mid.live.com/si/login.aspx?__ufps=$m');  
  38. curl_setopt($ch,CURLOPT_POST,count($campo));
  39. curl_setopt($ch,CURLOPT_POSTFIELDS,$campo_string);
  40. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
  41. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
  42. $result = curl_exec($ch);
  43. echo $result;
  44.  
  45. ?>
clone this paste RAW Paste Data