Posts

Showing posts from July, 2016

How to make Web crawler in php ? display url

Step 1. Create index.php <!DOCTYPE html> <html>  <head>   <title>email PHP</title>  </head>  <body>   <div id="content" style="margin-top:10px;height:100%;">    <center><h1>Extrac Email PHP</h1></center>    <form action="index.php" method="POST">     URL : <input name="url" size="35" placeholder="http://www.subinsb.com"/>     <input type="submit" name="submit" value="Start Crawling"/>    </form>    <br/>    <?    include("simple_html_dom.php");    $crawled_urls=array();    $found_urls=array();    function rel2abs($rel, $base){     if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;     if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;     extract(parse_url($base));     $path = pr...