Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. $ch = curl_init();
  3. $data=array(
  4. 'username'=>'yogo',
  5. 'pass'=>'1sampai5',
  6. );
  7. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  8. curl_setopt($ch, CURLOPT_URL, "https://contoh.com/login.php");
  9. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie-name.txt');  
  12. curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie-name.txt');
  13. $hasil=curl_exec($ch);
  14. curl_close ($ch);
  15. echo $hasil;
  16. ?>