Creating a Simple PHP WebCrawler

Leave a Comment
A web crawler is a program that visits Web sites and reads their pages and other information in order to create entries for a search engine index. This is a simple PHP web crawler sample code.

This code is available on  Github here
 Now,
Create index.php and paste the following code 


This is simply an HTML form with a field and a button. This is where we will type the site Url we want to crawl.

Create crawler.php and paste the following piece of code.

$find = "http://";

Change "http://" to https// if you are crawling a an https site otherwise keep it http



Then finaly create the simple_html_dom.php and paste the code below. This is also available in Sourceforge.net.  Enjoy Coding.



0 comments:

Post a Comment