I am supposed to construct a page that searches in specific websites to extract information, like those sites from where you can rent a car for example. There is a form in the site where the user selects some fields (for instance departure and drop-off date), then the data are submitted to the other page that searches 2-3 sites and finds which cars are available on those dates.
I wanted to ask if there are ready scripts to do that, if not, some hints on how to start.
I am familiar with PHP forms and data extraction from mysql databases, but when you extract data from other sites, I have no clue how I can begin and deal with it...
Page 1 of 1
2 Replies - 6707 Views - Last Post: 14 November 2006 - 08:43 PM
Replies To: web crawling PHP
Re: web crawling PHP
Posted 14 November 2006 - 06:04 PM
I'm not sure I understand entirely what you mean but if you want to get the contents of a site you can use something as simple as:
file_get_contents('http://www.somewebsite.com/someurl.html");That will return all of the contents of that file in a string. Then it's just a matter of analyzing the string using string operations such as strpos() and substr() and the like.
Page 1 of 1