Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1. <?php
  2. $search = $_POST["suche"];
  3. $search = str_replace(' ', '+', $search);
  4. $site = 'http://hdfilme.tv/movie-search?key=' .$search;
  5. echo $site."\r\n";
  6. $ch = curl_init($site);
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  8. curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
  9. $content = curl_exec($ch);
  10. curl_close($ch);
  11.  
  12. $text = preg_replace("/[\r\n]+/", "\n", $content);
  13. $text = preg_replace("/\s+/", ' ', $text);
  14.  
  15.  
  16.  
  17. preg_match("/<ul[^>]*class=\"products row\"[^>]*>(.*) <\/div> <\/div> <\/div> <\/ul>/m", $text, $matches);
  18.  
  19. preg_match_all("/<span[^>]*class=\"name\"[^>]*>([^<>]*)<\/span>.*?/m", $matches[0], $array);
  20.  
  21. preg_match_all("/<div[^>]*class=\"box-product clearfix\"[^>]*>\s*?<a[^>]*href=\"([^\"]*)\"[^>]*>.*?/m", $matches[0], $array2);
  22.  
  23. for($i=0; $i<count($array[0]); $i++) {
  24.     $urltemp = $array2[1][$i];
  25.     $nametemp = $array[0][$i];
  26.     echo '<pre>'; print_r('<a href=get_episodes.php?serie=' .$urltemp  .'>' .$nametemp ."</a>"); echo '</pre>';
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement