


To activate your installation of Delphi 7 Personal edition, just visit the Borland website and create an account. The size is around 54 MB compressed and 148 uncompressed. Delphi 2005 Personal Edition has only been offered through some magazines in Europe, but Delphi 7 can be downloaded from the Borland website, even though they no longer advertise it.

The INTERNET_FLAG_RELOAD flag was VERY important to me: it makes sure the download is performed each time InternetOpenURL is called, in other words it ignores caching! If you don't care about real-time, up-to-date contents, you might want to specify the value 0 instead.Borland has previously offered a downloadable version of their Delphi IDE called the “Personal edition”.In this example, I used the hardcoded value of "My application", but you can of course change this to whatever string you want. In InternetOpen you can specify the "agent" who performs the download.That's it!Īlthough this code works as described above, there are some additional things worth mentioning: To download a file, call the function GetFileFromURL with the location (URL) of the file, and the name of the file where you want to store the downloaded content. InternetReadFile(url, SizeOf(buffer), bufferLength) Url := InternetOpenURL(session, PChar(location), nil, 0, INTERNET_FLAG_RELOAD, 0)

Session := InternetOpen('My application', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) In order to be able to get the data for my little Q-Music versus Studio Brussel test, I needed a way to download the xml data from the aforementioned radio station's websites.ĭownloading a small file in Delphi is relatively easy - in the following code snippet, I'll show you how this works.įirst of all, here's the code: don't forget to include units SysUtils, Windows and WinInet in your program if you're going to use this snippet.įunction GetFileFromURL(const location, filename : String) : boolean
