[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Retrive text from http.

Posted on 1998-09-24
6
Medium Priority
?
149 Views
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.

Thanks.
0
Comment
Question by:Karma121397
[X]
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
6 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 800 total points
ID: 1340797
Check Francois Piette's great components at http://www.rtfm.be/fpiette/indexuk.htm. 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...
0
 

Author Comment

by:Karma121397
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.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340799
How about this,,,,

var
  f : TextFile;
 str : string;
begin
  AssignFile(f, 'C:\windows\yourfile.txt');
  Reset(f);
  Readln(f, str);
  ShowMessage(str);
  CloseFile(f);      
end;

Regards,
Viktor Ivanov
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

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

Expert Comment

by:viktornet
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.

Regards,
Viktor Ivanov
0
 
LVL 10

Expert Comment

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

Regards,
Viktor Ivanov
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

649 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