0

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...:)

Community
  • 1
  • 1
Prashant Singh
  • 3,725
  • 12
  • 62
  • 106

3 Answers3

5

Did you look at the documentation? Basically, just do a curl_setopt()

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST);
Owen
  • 82,995
  • 21
  • 120
  • 115
1

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

locrizak
  • 12,192
  • 12
  • 60
  • 80
0

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
Pendlepants
  • 199
  • 2