News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christian Schaefer's Blog:
Using PHP Web Scraper Goutte in a Console Task in a Silex project
October 10, 2011 @ 08:26:24

In a recent post to his blog Christian Schaefer shows how to use the Goutte tool (a web scraper) to pull information from one site and use it in another Silex-powered one. His tutorial uses a custom service provider for the integration.

Since I discovered the free Facebook App hosting by heroku I keep wanting to make something useful out of it. So I thought about a small service app. Without going into details yet about its nature there was one immediate problem to be solved. How to get hold of the data? So I thought to scrape it off some website. I know this isn't very nice but unfortunately there is no feed I can use.. And how to best scrape a website? Use Goutte!

All you'll need is two things - the goutte.phar and Silex phar files. The code for the service provider is a simple registration of namespaces. With that integrated, it's as simple as making a client object and calling it with a URL.

0 comments voice your opinion now!
silex goutte webscraping tutorial serviceprovider phar


blog comments powered by Disqus

Similar Posts

PHPMaster.com: Generating Invoices with Zend_Pdf

NETTUTS.com: ASP.NET for PHP Developers: Part 2

Zend Developer Zone: Flex and PHP: Party in the Front, Business in the Back

Gonzalo Ayuso: Scaling Silex applications (part II). Using RouteCollection

Chance Garcia's Blog: TEKX Tutorials - Best Practices & Being the Bad Guy


Community Events











Don't see your event here?
Let us know!


install language introduction application unittest hhvm overview opinion database release framework component podcast package performance security symfony2 facebook composer hack

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework