cdfteller

Request Payload - IFLIX

Jan 28th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. date_default_timezone_set("Asia/Jakarta");
  3. //require './includes/class_curl.php';
  4.  
  5. $iflix = new iflix();
  6. echo $iflix->check($_GET['e'], $_GET['p']);
  7.  
  8. class iflix{
  9. public function check($email, $pass){
  10.  
  11. $array = array(
  12. "email" => "$email",
  13. "password" => "$pass"
  14. );
  15.  
  16. $param = json_encode($array);
  17.  
  18. $ch = curl_init('https://m.iflix.com/api/identity/auth/iflix/login');
  19. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  20. curl_setopt($ch, CURLINFO_HEADER_OUT, true);
  21. curl_setopt($ch, CURLOPT_POST, true);
  22. curl_setopt($ch, CURLOPT_POSTFIELDS, $param);
  23. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  24. $result = curl_exec($ch);
  25. echo $result;
  26. }
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment