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

curl-and-php

Re: https:// Login and Cookies Being used

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Aug 2003 18:25:09 +0200 (CEST)

On Mon, 11 Aug 2003, Justin wrote:

> $formvars['action'] = "doLogin\n";
> $formvars['target'] = "Login\n";
> $formvars['min'] = "*********\n";
> $formvars['password'] = "*******\n";

[snip]

> curl_setopt($ch, CURLOPT_POSTFIELDS, $formvars);

Using this approach causes the PHP/CURL module to perform a multipart
formpost, while that web page is setting up a normal post. That is likely to
severely confuse the receiver.

Create the $formvars as a single string instead, in this style:

 $formvars="min=blablabla&password=hejhej&action=doLogin";

And it might just work better.

Sure, it may also be a cookie "thing" but first things first. Use the VERBOSE
option and its output to debug what you receive and send.

Personally, I always recommend using the curl tool for debugging purposes.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-11