Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //www.phonebook.com.pk/dynamic/search.aspx?searchtype=cat&class_id=1131&page=2
- ?>
- <?php
- set_time_limit(0);
- $temp="";
- // error_reporting(0);
- echo "<ol>";
- for($i = 0 ; $i<=59 ; $i++){
- $result = file_get_contents("http://karachi.bolee.com/nf/search-p-".$i."/computer-services");
- //echo $login;
- // <td style="width: 70%;"></td>
- preg_match_all('#http://karachi.bolee.com/detail/(.*?)"#', $result, $matches);
- foreach ($matches[1] as $key => $value) {
- if ($temp != $value)
- {
- echo "<li>".$value."</li>";
- $temp = $value;
- $links = file_get_contents("http://karachi.bolee.com/detail/".$value);
- preg_match_all('#<span class="pull-right">(.*?)</span>#', $links, $matchess);
- echo "<li>".$matchess[0][0]."</li>";
- $myfile = fopen("sms_no.txt", "a") or die("Unable to open file!");
- fwrite($myfile,$matchess[1][0]."\n");
- fclose($myfile);
- flush();@ob_flush();
- }
- }
- flush();
- @ob_flush();
- }
- echo "</ol>";
- //[email protected] (For Any Type Of Web Scraping and Data Mining)
- ?>
Add Comment
Please, Sign In to add comment