Saving Scraped Data to a Database
Overview
We continue on with our shopping site in this tutorial by inserting the data we scrape into a database. Generally once you've extracted data from a web site you want to save it out either to a file or a database. We already went over saving the data to a file in Tutorial 2, so here we'll cover inserting the information into a database.
If you haven't gone through Tutorial 2, or don't still have the scraping session you created in it, you can download it and import it into screen-scraper.
Tutorial Requirements
As we will not be inserting the data into a database, but rather sending it to an external script, all you need is a web server on which to run the PHP script. If you do not have access to a PHP server don't worry, you can run the script using the PHP script sitting on one of our servers to see how it will work. In other words, you don't really need anything except a few minutes and screen-scraper.
Finished Project
If you'd like to see the final version of the scraping session you'll be creating in this tutorial you can download it below.
Attachment | Size |
---|---|
Shopping Site (Scraping Session).sss | 13.18 KB |
- Printer-friendly version
- Login or register to post comments