Hi
I'm trying to scrape the content from:
http://www.westcountry-motorhomes.co.uk/new_list.asp
Through a browser this page is shown when you've POSTed a form from:
http://www.westcountry-motorhomes.co.uk/new_search.asp
I have permission from the website owner to do this scraping and post the results on my website http://www.searchmotorhome.com
I'm trying to use the following code, but can't understand why it doesn't work. All I get is the html from the new_search.asp code. My hosting company has opened the firewall to the site.
<?
$myURL="www.westcountry-motorhomes.co.uk/new_search.asp";
$chttp = curl_init();
curl_setopt($chttp, CURLOPT_URL,"http://$myURL");
curl_setopt($chttp, CURLOPT_POST, 1);
curl_setopt($chttp, CURLOPT_POSTFIELDS, "vehicleType=All&make=Any&berths=No%20Minimum&priceRange=No%20Limit");
curl_exec ($chttp);
curl_close ($chttp);
var_dump($chttp);
?>
I've seen some forums talk about viewstate - but don't understand how I would implement that or if I need to. Fairly inexperienced in PHP.
Thanks in advance for your help.