cURL / Mailing Lists / curl-library / Single Mail

curl-library

Posting form data using C (Windows)

From: Navin Viegas <viegas_at_lycos.com>
Date: Sat, 15 Jun 2002 03:42:43 -0700

Hi,

   I am using libcurl for the first time to post data.
Was trying to automate my login to yahoo mail, but it
kept displaying the login page again. So i tried with
a simpler form data, the output kept saying that either
the email and passwd is wrong, but i am sure that the
email and passwd are fine.
Can somebody help me out, details below.
-Navin
====================================FORM DATA=========
        <FORM METHOD=POST
              ACTION="http://asur:4000/vc30/xt_shopper_lookup.asp"
                NAME="LookupUser">
         <TABLE><TR><TD>E-Mail:</TD>
         <TD><INPUT TYPE="text" SIZE=32 NAME="email">
                  </td>
                </TR>
             <TR><TD> Password: </td>
         <TD> <INPUT TYPE=password SIZE=32 NAME="password">
                 <td>
                <TD WIDTH=10 ><BR></TD>
                </TR>
                <TR>
                    <TD>
           <BR><BR><INPUT TYPE=image SRC="assets/images/btn_continue.g
f" ALIGN=TOP BORDER=0>
               </TD>
                </TR>
            </TABLE>
        </FORM>
====================================C-Code====
The code for above was :
URL *curl;
char *data="email=clagg_at_clagg.com&password=clagg";
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
curl_easy_setopt(curl, CURLOPT_URL, "http://ipaddress/vc30/xt_shopper_lookup.asp");
 
curl_easy_perform(curl);

_______________________________________________________
WIN a first class trip to Hawaii. Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
Received on 2002-06-15