I am trying to get the search results for each company category from the website http://www.keybrick.net/portal/75800/Search.aspx into a variable so i can parse it. I have done similar thing before but cannot seem to get this to work for me. My PHP code to attempt to get the listings for the Advertising category is:
curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, “http://www.keybrick.net/portal/75800/Search.aspx”);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, ‘Dropdowlist1=Advertising’);
curl_setopt($curl, CURLOPT_HEADER,0);
$returned=curl_exec ($curl);
curl_close ($curl);
echo $returned;
This is just giving me the form with no search results. I am an experienced programmer, just new to web-based apps and PHP. Any help would be greatly appreciated. I can be contacted at [email protected] for any questions. Thanks for looking.