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

curl-and-php

Re[8]: Sessions in CURL

From: Vladimir <vladkalmik_at_yahoo.com>
Date: Wed, 13 Jun 2001 13:52:08 +0300

Hello Daniel,

DS> You were supposed to modify the URL and post only the type thing. At least if
DS> you're still trying to fill in the form you posted about previously.

DS> Thus,

DS> $url="https://secure.server.com/index.asp?Name=Name&Operand=23236&OperID=16614";
DS> $request="Type=Other";

>> curl_setopt($ch, CURLOPT_TIMEOUT, 120);
>> curl_setopt($ch, CURLOPT_URL, "https://secure.server.com/index.asp");

DS> instead make that

DS> curl_setopt($ch, CURLOPT_URL, $url);

OK. Thanks. I found one more mistake in my code. BUT...

>> The second part has troubles. ?????

This is the second query to the server.

$url="http://www.server.com/user.cfm?action=login";

$request= "UID=5&PWD=55";
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0");
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_COOKIEFILE, "111.txt");
$result =curl_exec($ch);

It is very interesting.
When I have wrong UID or PWD server return a page with alert that I
sent wrong password or Login. This is wonderful
BUT...
Then I send valide information it says nothing. Moreover it return
empty page no (header even) nothing.
I do not understand. I need the result.
Help me, please :)

-- 
Best regards,
 Vladimir                            mailto:vladkalmik_at_yahoo.com
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Curl-and-php mailing list
http://curl.haxx.se/
Received on 2001-06-13