Curl and screen scraping advice please :)

This is a discussion on Curl and screen scraping advice please :) within the PHP forums, part of the Development category; Hi All, as im sure some of you are aware im setting up a price comparison feature from an api ...


Reply
 
LinkBack Thread Tools Display Modes
Old 4th February 2010, 09:06 PM   #1
Member
 
ljackson's Avatar
 
Join Date: Feb 2009
Location: Cornwall
Posts: 270
Thanks: 14
Thanked 1 Time in 1 Post
ljackson is on a distinguished road
Expertise: PHP
Experience: Intermediate
Exclamation Curl and screen scraping advice please :)

Hi All,

as im sure some of you are aware im setting up a price comparison feature from an api protocal which stores millions of products,

the main problem with this is that its not very reliable for example if i search modern warfare 2 on xbox 360 it might return 10 stores which sells it but half the products it finds are the communicator and there is no record of the actual game from particular merchants. for example play and zavvi dont have the game listed that i can find, so i was wondering how easy curl and screen scraping was and if im more likley to get better result set :)

i have found a website Find DVD - Compare DVD prices from dozens of UK retailers which seems to be spot on when it comes to the price comparison all the links link to the actual product im searching for but im not sure how they do it :)

any advice would be appreciated :)
cheers
Luke
__________________
www.kernow-connect.com - Online Shopping | Price Comparison | Discount Codes
ljackson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 6th February 2010, 01:13 AM   #2
supermod
 
CloudedVision's Avatar
 
Join Date: Jan 2009
Location: Your Imagination
Posts: 624
Blog Entries: 4
Thanks: 1
Thanked 22 Times in 21 Posts
CloudedVision has a spectacular aura aboutCloudedVision has a spectacular aura aboutCloudedVision has a spectacular aura about
Expertise: PHP
Experience: Professional
Default

Well, first you would need a spider:
  • cURL to a product page
  • Parse it with an XML/HTML parser. The default PHP is rather complex, but this looks promising: PHP Simple HTML DOM Parser
  • Find price, product picture, etc.
  • Put into a database
And then users can search the database on your website. Here's a good link on how to create a PHP search function. PHP search engine
CloudedVision is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Old 7th February 2010, 09:47 PM   #3
Member
 
ljackson's Avatar
 
Join Date: Feb 2009
Location: Cornwall
Posts: 270
Thanks: 14
Thanked 1 Time in 1 Post
ljackson is on a distinguished road
Expertise: PHP
Experience: Intermediate
Default

interesting.. thanks mate
__________________
www.kernow-connect.com - Online Shopping | Price Comparison | Discount Codes
ljackson is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!twitter
Reply With Quote
Reply

Tags
advice, curl, scraping, screen

Thread Tools
Display Modes