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

curl-and-php

Re: Re[4]: PHP binary CURL and HTTPS

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 7 Jun 2001 16:30:15 +0200 (MET DST)

On Thu, 7 Jun 2001, YAHOO!!! wrote:

> exec("C:/PHP/curl -m 120 -d Login=login -d Passord=password
> https://secure.server.com/login.asp -L", $return_message,$return_number);
>
> And I get the result as wrong Login or password. Login and password from
> HTML form are accepted by server.

You mean that when you fill them in with your browser it works?

Then, start trying to identify how the browser's POST differs from yours:

 1. Did you fill in user+password in the browser before the actual post? I.e
    do you get a 4XX error code in the HTTP headers back when you use curl?

 2. Your POST line doesn't include "btnSubmit=Login" which may or may not be
    relevant. (the HTML <form> tag includes it)

 3. Your browser uses a user-agent string that the remote server may use
    to detect "false" logins.

If the -L means that curl follows a location, it may imply that several
requests are performed and thus we can add:

 4. You might get cookies back that need to be sent on subsequent requests,
    enable curl's cookie engine with -b.

 5. You might need to set the referer string, try -e.

 6. There are probably more details I haven't thought of right now.

Welcome to give-me-your-best-guess hour!

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-and-php mailing list
Curl-and-php_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-and-php
Received on 2001-06-07