🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3814

Re: ClientSocket; Downloading a file from internet

#3814
From: Param
Date: Fri, 29 Apr 2005 23:53
40 lines
2142 bytes
Forgot to add, it doesn't connect to site just waits...

Param wrote:

> 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: <4272c8ef$1@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-mail
References: <4272c790@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,100e2486fa6e2fb2,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 30 Apr 2005 00:53:19 +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: Re: ClientSocket; Downloading a file from internet
References: <4272c790@newsgroups.borland.com>
In-Reply-To: <4272c790@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.67.13.8
Message-ID: <4272c8ef$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1114818799 84.67.13.8 (29 Apr 2005 16:53:19 -0700)
Lines: 40
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