cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: php-curl script not working in firefox

From: Rajeev Kumar <rajisstillhere_at_gmail.com>
Date: Tue, 26 May 2009 15:23:41 +0530

@Miachel i got it . apache is saving file in some other directory so i
explicitly gave path of /tmp/ .

thnx
-is0dvil

On Tue, May 26, 2009 at 3:17 PM, Rajeev Kumar <rajisstillhere_at_gmail.com>wrote:

> ok thnx just a little thing
>
> curl_setopt($ch,CURLOPT_URL, 'http://192.168.1.11/logon.htm'<http://192.168.1.11/logon.htm%27>
> );
> 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');
> 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.
>
> -is0dvil
>
> On Tue, May 26, 2009 at 2:53 PM, Michael Wood <esiotrot_at_gmail.com> wrote:
>
>> On Tue, May 26, 2009 at 10:59 AM, Rajeev Kumar <rajisstillhere_at_gmail.com>
>> wrote:
>> > I am a newbie to curl so plz dont mind if my question is silly.
>> >
>> > I m trying to write a php-curl script which can automatically login in
>> some
>> > site.
>> > When i run this script in my firefox(ver 2.0.0.2) it doesnt work but
>> when i
>> > run this in terminal
>> > #php script.php
>> > it works fine!!!
>> >
>> > why is it so????
>> > how do i fix this???
>>
>> This will have nothing to do with Firefox, but rather the web server
>> you are using. If this works from the command line, then it seems
>> this is the wrong mailing list to ask your question.
>>
>> Ask on a mailing list relevant to your web server, and provide them
>> with more information. Don't just say it doesn't work. Tell them HOW
>> it doesn't work. What error messages do you get (in the browser and
>> in the web server logs) etc. Also tell them what your script prints
>> out when you run it from the command line.
>>
>> --
>> Michael Wood <esiotrot_at_gmail.com>
>>
>
>
Received on 2009-05-26