php curl problem

I am trying to get the search results for each company category from the website 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, “”);
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.


You may want to build and use a stream wrapper, instead of just using curl.

A good place for info on wrappers is: That is a great site with lots of great open source code.

Hope that helps!

Sponsor our Newsletter | Privacy Policy | Terms of Service