A simple PHP web app that scrapes books from books.toscrape.com, including multiple pages and categories.
- Select category from dropdown
- Crawls all pages of that category
- Extracts:
- Book title
- Price
- Availability
- Book link
- Exports to CSV
- Displays results in responsive Bootstrap table
Run locally with XAMPP or any PHP server
- Clone or download this repo
- Place folder inside
htdocs/
(if using XAMPP) - Start Apache and visit
http://localhost/php-book-crawler/index.php
- Choose a category and click "Scrape"
- PHP 7.4+
- cURL enabled
- DOM extension (default in PHP)
php-book-crawler/ ├── index.php ├── scrape.php ├── scraper/ │ └── BookScraper.php ├── exports/ │ └── books.csv
🔒 2. .gitignore
exports/books.csv *.log
- PHP 8+
- DOMDocument
- Simple HTML DOM Parser (προαιρετικά)
- Bootstrap (για το UI)