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

curl-and-php

Re: Command line works....can't get libcurl or exec (curl) to post to https

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 3 Aug 2004 19:24:38 +0200 (CEST)

On Tue, 3 Aug 2004, Williams, Art wrote:

> Here is what doesn't work...
>
> $st = exec("curl -b cookies.txt -c cookies.txt -d $clientstring
> https://www.myagency.net/iQuote/iQuote.asp?sid=11337&tid=1");
>
> echo $st;
>
> This also doesn't work...

What happens?

> $ch =
> curl_init("https://www.myagency.net/iQuote/iQuote.asp?sid=11337&tid=1");
> curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt");
> curl_setopt ($ch, CURLOPT_COOKIEFILE, "cookie.txt");
> curl_setopt ($ch, CURLOPT_POST, 1);
> curl_setopt ($ch, CURLOPT_POSTFILEDS, $clientstring);
> curl_exec($ch);
> curl_close($ch);

... and what happens for this then? Like what does curl_exec() return?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-03