Post request using CURL [duplicate]
Possible Duplicate:
Post data and retrieve the response using PHP Curl?
I want to make a number of POST requests (about 1000) to read data from a webpage which accepts post requests.I am aware about the implementing CURL through GET, but not through POST. So, please help me in this.
Thanks in advance...:)
Did you look at the documentation? Basically, just do a curl_setopt()
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST);
I agree with everyone else, quick search through the docs would have helped you here.
Heres an explination I found on how to do it http://davidwalsh.name/execute-http-post-php-curl
You'll want to use curl_setopt to set the CURLOPT_POST option to TRUE like this:
$curl_request = curl_init('http://path/to/url');
curl_setopt($curl_request, CURLOPT_POST, TRUE);
// Finish setting options and make the request
精彩评论