Programming

  • 15 {{ upvoteCount | shortNum }}

    Simple web crawler/spider

    AkosBlog in Programming

    Hi all, I am just developing a very simple web spider/crawler. Here is the code: PHP Code: <?php$seed = "http://www.akosblog.com";$html = file_get_contents($seed);echo "Page : " . $seed;preg_match_all("/http:\/\/[^\"\s']+/", $html, $matches, PREG_SET_ORDER);foreach ($matches as $val) {echo "<br><font color=red>links :</font> " . $val[0] . "\r\n";}?> This code just gets all the links from the selected page. Now ... [read more]