Article View: borland.public.cppbuilder.internet.web
Article #1066Re: Login with the POST method
From: Remy Lebeau (TeamB)
Date: Wed, 28 Sep 2005 23:01
Date: Wed, 28 Sep 2005 23:01
27 lines
1991 bytes
1991 bytes
"Aditya" <supersonic_ak@yahoo.com> wrote in message
news:433b0280$1@newsgroups.borland.com...
> A particular webpage has the following code. can someone
> please explain how to login to it using the POST method .
TIdMultiPartFormDataStream *PostData = new TIdMultiPartFormDataStream;
try
{
PostData.AddFormField("hash",
"DCE6B22AAFC495EE7C0D0C7D0110F3CE36CCC22C");
PostData->AddFormField("token_id", "342");
PostData->AddFormField("return_url", "/index.tcl");
PostData->AddFormField("time", "1127940206");
PostData->AddFormField("email", "joe@smoe.com");
PostData->AddFormField("password", "1234567");
if( Should Remember Login )
PostData->AddFormField("persistent_cookie_p", "1");
IdHTTP->Post(http://www.site.com/user-login, PostData);
}
__finally {
delete PostData;
}
Gambit
Technical Details
Message-ID:
<433b20cb$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<433b0280$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,182643a863859289 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.web References: <433b0280$1@newsgroups.borland.com> Subject: Re: Login with the POST method Date: Wed, 28 Sep 2005 16:01:54 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <433b20cb$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1127948491 68.69.17.41 (28 Sep 2005 16:01:31 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail