Guest User

tbt

a guest
Apr 24th, 2015
12
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?
  2. $url = "http://videoapi.my.mail.ru/videos/mail/hdfullfilmizlesene/_myvideo/866.json";
  3.  
  4.  
  5. $ch = curl_init($url);
  6. curl_setopt($ch, CURLOPT_REFERER, '');
  7. curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
  8. curl_setopt($ch, CURLOPT_HEADER, 1);
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  10. $cookieresult = curl_exec($ch);
  11. curl_close($ch);
  12.  
  13. preg_match('/^Set-Cookie:\s*([^;]*)/mi', $cookieresult, $m);
  14. parse_str($m[1], $cookies);
  15. var_dump($cookies);
  16.  
  17.  
  18.  
  19.  
  20.  
  21. $ch = curl_init($url);
  22. curl_setopt($ch, CURLOPT_REFERER, '');
  23. curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
  24. curl_setopt($ch, CURLOPT_HEADER, 0);
  25. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  26. $result = curl_exec($ch);
  27. curl_close($ch);
  28.  
  29.  
  30. $result = json_decode( $result, true );
  31. $values = array_values($result);
  32. $valuez = array_values($values[5]);
  33. $valuex = array_values($valuez[0]);
  34. echo $valuex[1];
  35. echo " <br/><br/><a href=".$valuex[1].">TIKLA IZLE</a>";
  36. ?>
RAW Paste Data