cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: How i can use curl option instead php fputs function?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 10 Mar 2003 21:29:40 +0100 (CET)

On Mon, 10 Mar 2003, azkar wrote:

> $ch = curl_init();
> curl_setopt ($ch, CURLOPT_TIMEOUT, 90);
> curl_setopt ($ch, CURLOPT_URL,REG_HOST.":".REG_PORT);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt ($ch, CURLOPT_HEADER, 0);
> ob_start();
> $result=curl_exec ($ch);
> ob_end_clean();
> curl_close ($ch);

And when you compare your example with one of the ones on the curl site:
http://curl.haxx.se/libcurl/php/examples/?ex=simplepost.php you'll see that
you don't use CURLOPT_POST or CURLOPT_POSTFIELDS.

So your code above sends a GET, not a POST...

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-03-10