Hey guys thanks for all the previous help you guys have given me im just fiddling with coding again and i was wondering what functions or rather what code would i use to create a very simple php spider which scans web pages for various things firstly using the file_get_contents(); function with a couple other functions included
Functions
Collapse
X
-
GuestTags: None
-
that code show u all url's from a page .... u cand extend the code and get more and more ...
PHP Code:<?php
$original_file = file_get_contents("http://site.com");
$stripped_file = strip_tags($original_file, "<a>");
preg_match_all("/<a(?:[^>]*)href=\"([^\"]*)\"(?:[^>]*)>(?:[^<]*)<\/a>/is", $stripped_file, $matches);
foreach($matches[1] as $link)
echo "$link<br/>";
?><?php unlink('World/Europe/Romania.country'); ?>
Comment