using CURL to post data to a search engine

From: Date: Fri, 27 Sep 2002 23:25:02 +0000
Subject: using CURL to post data to a search engine
Groups: php.general 
Request: Send a blank email to php-general+get-117901@lists.php.net to get a copy of this message
I am trying to use curl to post data to a search engine and then return the results in a variable so I can manipulate it. I have tried this but it does not seam to work properly. This is just an example of how I am trying to do this I don't have to use google for the search engine just thought if I can get it working with this I can get it to work with others $ch = curl_init ("http://www.google.com/"); curl_setopt ($ch, CURLOPT_POST, 1); $word="php"; $args="action=/search&hl=en&ie=UTF-8&oe=UTF-8&q=$word&btnG=Google Search"; curl_setopt ($ch, CURLOPT_POSTFIELDS, $args); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec ($ch); curl_close ($ch); echo $data; There does not seam to be much info or examples on using curl with php is there anyplace that you know of that has more info than the manual -- Best regards, rdkurth mailto:rdkurth@starband.net

« previous php.general (#117901) next »