Article View: borland.public.cppbuilder.internet.web
Article #202Logging in with TIdHTTP
From: Tom Byars
Date: Sun, 01 Jul 2007 10:44
Date: Sun, 01 Jul 2007 10:44
20 lines
1749 bytes
1749 bytes
I was using the following to fetch html from a site
MyIdHTTP->Get("http://www.racingpost.co.uk/horses/card_meeting.sd?crs=CUR&r_date=2007-7-1");
which worked fine until the site required a login, after which I received a
'302 Found' exception.
I've tried setting the IdHTTP Request properties
Password=MyPassword;
and
UserID=MyUserID;
but this makes no difference.
On setting the HandleRedirection property to true I find that the text
returned is for the sites login / register web page. Opening an IE window
and manually logging in doesn't help. Is there a way of logging in using
TIdHTTP? If not, is there a way of finding where the web site is looking for
the cookies so I can put these in place programatically.
Technical Details
Message-ID:
<46878587@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: feeec,e38d4989d40bbffa,start X-Google-Attributes: gidfeeec,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Tom Byars" <tam118118@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.web Subject: Logging in with TIdHTTP Date: Sun, 1 Jul 2007 11:44:34 +0100 Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16480 NNTP-Posting-Host: 90.195.48.216 Message-ID: <46878587@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1183286663 90.195.48.216 (1 Jul 2007 03:44:23 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail