Article View: borland.public.cppbuilder.internet.socket
Article #3815ClientSocket; Downloading a file from internet
From: Param
Date: Fri, 29 Apr 2005 23:47
Date: Fri, 29 Apr 2005 23:47
36 lines
1906 bytes
1906 bytes
Hi All,
This is my first post in Borland NG. I have never tried the Sockets in
Borland. I want to download this file from NL:
http://www.national-lottery.co.uk/player/files/EuroMillions.csv
Below is the part of code, can anyone guide me what i'm missing or how
to get this done in right way.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
try
{
if (ClientSocket1->Active)
ClientSocket1->Active = false;
ClientSocket1->Port = 80;
ClientSocket1->Address = "195.190.132.10";
ClientSocket1->Active = true;
if( ClientSocket1->Active )
{
ListBox1->AddItem("Connected", this);
// Download the file
// ClientSocket1->Socket->SendText("GET
player/files/EuroMillions.csv HTTP/1.0 \n\n");
}
}
catch(...)
{
ListBox1->AddItem("Exception", this);
}
}
Cheers
Nirvana
Technical Details
Message-ID:
<4272c790@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,100e2486fa6e2fb2 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Sat, 30 Apr 2005 00:47:26 +0100 From: Param <param_nirvana@yahoo.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: ClientSocket; Downloading a file from internet Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 84.67.13.8 Message-ID: <4272c790@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114818448 84.67.13.8 (29 Apr 2005 16:47:28 -0700) Lines: 36 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail