cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: php-curl script not working in firefox

From: Michael Wood <esiotrot_at_gmail.com>
Date: Tue, 26 May 2009 12:26:45 +0200

On Tue, May 26, 2009 at 11:47 AM, Rajeev Kumar <rajisstillhere_at_gmail.com> wrote:
> ok thnx just a little thing

Please don't top post.
http://curl.haxx.se/mail/etiquette.html#top-post

> curl_setopt($ch,CURLOPT_URL, 'http://192.168.1.11/logon.htm');
> curl_setopt($ch,CURLOPT_POST,1);
> curl_setopt($ch,CURLOPT_POSTFIELDS,'login_username=username&login_password=password&submit=Log+On');
> curl_setopt($ch,CURLOPT_COOKIEJAR,'cookie1.txt');

You will probably need to specify a full path to your cookie file in a
place where the web server has write access.

> curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
> $store=curl_exec($ch);
> echo $store;
> curl_close($ch);
> ?>
>
> when i execute the above script using command line it creates cookie1.txt
> but not when i run it from browser.(i need this cookie1.txt file for further
> use.script is not complete yet ). I checked the error logs of my
> webserver(apache/2.2.3) and there is none.

-- 
Michael Wood <esiotrot_at_gmail.com>
Received on 2009-05-26