Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

Usage of curl

General discussions related to php

Moderators: macek, egami, gesf

Usage of curl

Postby jop007 » Thu Nov 08, 2012 6:26 am

I have played a lot of times trying to start scraping data. I started to try with http://www.booking.com

with formfield ss=a&idf=on

but I don't get it to work.
I want to walk to the fields getting all the hotels starting with a "a"

If you have a good working example that is also great.

Thanks in advance John
PS I know booking.com has an API available but I want to be flexible when I encounter sites with no API
jop007
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Nov 08, 2012 6:12 am

Re: Usage of curl

Postby seandisanti » Mon Nov 12, 2012 2:50 pm

1) if the site has an api, use the api. Your working solution with an api will typically last a lot longer than a scrape solution, and a scrape will often be against the usage terms set forth by the site.

2) before i offer any real help, going to need to see a bit more effort on your part than 11 characters.
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP General

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.