In this tutorial you will learn how to build a PHP script that scrapes links from any web page.
What You’ll Learn
-
How to use cURL to get the content from a website (URL).
-
Call PHP DOM functions to parse the HTML so you can extract links.
-
Use XPath to grab links from specific parts of a page.
-
Store the scraped links in a MySQL database.
-
-
-
Legal issues associated with scraping content.
Full article: http://www.lightspeedretail.com/cloud/blog/2007/08/scraping-links-with-php/