i need to fetch the data from the given websites using only screen scraping and regular expressions in php and mysql.
How can i scrape a data from websites using screen scraping in php and how can i stores it in MYSQL?
For scraping, you can either use regular expressions or, if it's valid XML, you can use XQuery or other DOM parsing utilities. If you're just getting started, try regular expressions:
preg_match_all("/There are (.*) people logged in/", $thePage, $matches);
If $thePage contained "There are 21 people logged in", the function call would return 21.
As for storing the information in MySQL... well.. you should be able to Google for a tutorial on PHP/MySQL.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment