Advertisement
Guest User

iki bosku

a guest
Jun 18th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1.  
  2. <?php
  3. $dir = dirname(__FILE__);
  4. $config = $dir . '/_cook/' .rand(1,999999999999999). '.txt';
  5. if (!file_exists($config)) {
  6. $fp = @fopen($config, 'w');
  7. @fclose($fp);
  8. }
  9. $grab = htmlentities(file_get_contents("http://www.garena.co.id/login_ui/"));
  10. $pola = "&name='csrfmiddlewaretoken' value=(.+?)'&";
  11.  
  12. $hasil_arr = array();
  13. $hasil_akhir = "";
  14.  
  15. preg_match($pola, $grab, $hasil_arr);
  16. $token = $hasil_arr[1];
  17.  
  18. echo "Token website = $token<br>";
  19. echo "</pre>";
  20.  
  21. $cookie = 'cookie.txt';
  22. $ch = curl_init('http://www.garena.co.id/login_ui/');
  23. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  24. curl_setopt($ch,CURLOPT_POST,1);
  25. curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
  26. curl_setopt($ch,CURLOPT_POST,TRUE);
  27. curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE);
  28. curl_setopt($ch,CURLOPT_COOKIEFILE, $config);
  29. curl_setopt($ch,CURLOPT_COOKIEJAR, $config);
  30. curl_setopt($ch,CURLOPT_POSTFIELDS,"csrfmiddlewaretoken=$token&username=didintri196&password=angga12345");
  31. $result = curl_exec($ch);
  32. echo"$result";
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement