Advertisement
awaw14

php script

Oct 16th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 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.  
  7. function get_data($url) {
  8.     $ch = curl_init();
  9.     // Set the url
  10.     curl_setopt($ch, CURLOPT_URL, $url);
  11.     // Set the result output to be a string.
  12.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13.     $output = curl_exec($ch);
  14.     curl_close($ch);
  15.     return $output;
  16. }
  17.  
  18. $string = get_data($channelid);
  19. preg_match_all('/file:/',$string,$matches, PREG_PATTERN_ORDER);
  20. $var1=$matches[1][0];
  21. echo $var1;
  22. //header("Location: $var1");
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement