Retrive text from http.

Posted on 1998-09-24
Last Modified: 2012-05-04
I need to retrive a single line of text from a file on my web server and load it into a string. I don't want to use the internet components that ship with delphi 4 since they require external files. Can someone give me an example of how this might be done.

Question by:Karma121397
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

BlackMan earned 200 total points
ID: 1340797
Check Francois Piette's great components at There is a freeware HTTP component with source and a demo. Your best bet is to download the whole ICS file, it seems that the .DPK files are missing if you download only the specific archive...

Author Comment

ID: 1340798
I've downloaded the complete set already... I have no clue how to convert the TMemoryStream, which the http component uses, into a string.  Could you give me an exapmle of how to accomplish this? Thanks.
LVL 10

Expert Comment

ID: 1340799
How about this,,,,

  f : TextFile;
 str : string;
  AssignFile(f, 'C:\windows\yourfile.txt');
  Readln(f, str);

Viktor Ivanov
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 1340800
Is there no way to do it without having to save the stream to a file first?
LVL 10

Expert Comment

ID: 1340801
This is not saving. This is reading the string from a text...In order to read the data you need to save it before that, wether you save it yourself you using programming code.

Viktor Ivanov
LVL 10

Expert Comment

ID: 1340802
Is that what you needed? ;->

Viktor Ivanov

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi Spellcheck in Webbrowser 1 76
Twebbrowser in Fire monkey android scrolling to bottom 1 85
Delphi android app hide keyboard 3 82
Browsing a TTreeView in Delphi 5 47
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question