awaw14

php script

Oct 18th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. $channelid = $_GET["url"];
  4. //$url = "www.canlitvlive.co/tvizle.php?t=1&tv=atv-izle";
  5.  
  6. function get_data($url)
  7. {
  8.     $sourceCode = file_get_contents($url);
  9.     return $sourceCode;
  10.  
  11.     /*
  12.     curl_setopt($ch, CURLOPT_URL, $url);
  13.     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
  14.     curl_setopt($ch, CURLOPT_USERAGENT, get_user_browser());
  15.     curl_setopt($ch, CURLOPT_REFERER, "http://google.com");
  16.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  17.     curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
  18.     $data = curl_exec($ch);
  19.     curl_close($ch);
  20.     return $data;
  21.     */
  22. }
  23.  
  24. $string = get_data($channelid);
  25. //echo $string;
  26. preg_match_all('/(live\.m3u8)/',$string,$matches, PREG_PATTERN_ORDER);
  27. $var1=$matches[1][0];
  28. echo $var1;
  29.  
  30. //header("Location: $var1");
  31.  
  32.  
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment