note 10226 added to curl_setopt
| From: | tim at spectre dot com | Date: | Wed, 20 Dec 2000 06:32:25 +0000 |
| Subject: | note 10226 added to curl_setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8939@lists.php.net to get a copy of this message | ||
Getting curl to post is a little confusing at first. Here is the code to post to a web page.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.mysite.com/tester.phtml");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"postvar1=value1&postvar2=value2&postvar3=value3");
curl_exec ($ch);
curl_close ($ch);
hope that helps somebody
Tim
http://www.php.net/manual/function.curl-setopt.php