Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $search = $_POST["suche"];
- $search = str_replace(' ', '+', $search);
- $site = 'http://hdfilme.tv/movie-search?key=' .$search;
- echo $site."\r\n";
- $ch = curl_init($site);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
- $content = curl_exec($ch);
- curl_close($ch);
- $text = preg_replace("/[\r\n]+/", "\n", $content);
- $text = preg_replace("/\s+/", ' ', $text);
- preg_match("/<ul[^>]*class=\"products row\"[^>]*>(.*) <\/div> <\/div> <\/div> <\/ul>/m", $text, $matches);
- preg_match_all("/<span[^>]*class=\"name\"[^>]*>([^<>]*)<\/span>.*?/m", $matches[0], $array);
- preg_match_all("/<div[^>]*class=\"box-product clearfix\"[^>]*>\s*?<a[^>]*href=\"([^\"]*)\"[^>]*>.*?/m", $matches[0], $array2);
- for($i=0; $i<count($array[0]); $i++) {
- $urltemp = $array2[1][$i];
- $nametemp = $array[0][$i];
- echo '<pre>'; print_r('<a href=get_episodes.php?serie=' .$urltemp .'>' .$nametemp ."</a>"); echo '</pre>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement