Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2. $serie = $_GET['serie'];
  3. $site = $serie;
  4. $ch = curl_init($site);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  6. curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
  7. $content = curl_exec($ch);
  8. curl_close($ch);
  9.  
  10. $text = preg_replace("/[\r\n]+/", "\n", $content);
  11. $text = preg_replace("/\s+/", ' ', $text);
  12.  
  13. preg_match_all("/(\d+)-stream(?:\?episode=(\d+))?/m", $text, $array);
  14.  
  15. for($i=1; $i<count($array[2]); $i++) {
  16.     echo '<pre>'; print_r('<a href=get_files.php?id=' .$array[1][0] ."&" ."ep=" .$array[2][$i]  .'>' .$array[2][$i] ."</a>"); echo '</pre>';
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement