Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('MAX_EXECUTION_TIME', -1);
- include_once("simple_html_dom.php");
- $url = "http://santhuoc.vn/page/";
- for ($i=1; $i<=1000; $i++){
- $pagesurl = $url.$i;
- $html = file_get_html($pagesurl);
- preg_match_all ("/a[\s]+[^>]*?href[\s]?=[\s\"\']+"."(.*?)[\"\']+.*?>"."([^<]+|.*?)?<\/a>/", $html, $matches);
- $matches = array_unique($matches[1]);
- $list = array();
- foreach($matches as $html)
- {
- echo $html;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement