Advertisement
janter13

cek login

Oct 11th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.94 KB | None | 0 0
  1. formnya bikin sendiri ye xd
  2.  
  3. <?php
  4.  
  5. if(isset($_POST['login'])){
  6. $em = $_POST['email'];
  7. $pw = $_POST['pass'];
  8. $login = array(
  9. 'email' => $em,
  10. 'pass' => $pw,
  11. 'login' => 'Log In',
  12. );
  13. $ng = _req2($login,'https://mobile.facebook.com/login.php', $em);
  14.  
  15. if($ng){
  16. if(!preg_match('/c_user/', file_get_contents($em))){
  17. echo $em.' SUKSES !<br>';
  18. }else{
  19. echo $em.' GAGAL !<br>';
  20. }
  21. }
  22. }
  23.  
  24. function _req2($data,$url,$log){
  25. $fields = '';
  26. foreach($data as $key => $value){
  27. $fields .= $key . '=' . $value . '&';
  28. }
  29. rtrim($fields, '&');
  30. $post = curl_init();
  31. curl_setopt($post, CURLOPT_URL, $url);
  32. curl_setopt($post, CURLOPT_POST, count($data));
  33. curl_setopt($post, CURLOPT_POSTFIELDS, $fields);
  34. curl_setopt($post,
  35. CURLOPT_RETURNTRANSFER, 1);
  36. curl_setopt($post,
  37. CURLOPT_FOLLOWLOCATION, 1);
  38. curl_setopt($post,CURLOPT_COOKIEJAR, $log);
  39. curl_setopt($post,CURLOPT_COOKIEFILE, $log);
  40. $result = curl_exec($post);
  41. curl_close($post);
  42. return $result;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement