Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Html code parsing ?

Posted on 2006-05-07
2
Medium Priority
?
177 Views
Last Modified: 2010-04-05
I have a html page that i need to parse and get some value from peace of code. I need some one to write me code to get 123456789 from html code.

Code loks like
...
... <img width="300" alt="Test" height="90" src="/index?get=TEST;Value=123456789"> ...
...
0
Comment
Question by:65zgtre45rr
2 Comments
 
LVL 16

Accepted Solution

by:
CodedK earned 2000 total points
ID: 16625175
Hi. I just wrote it now i didnt test ... So i dont know if it works :)
Drop 2 memos, a button, an editbox and a idhttp on the form.

Memo1 should be set visible:=False and with a vertical scrollbar.
Memo2 will hold the results.
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

var
ThePage, Load :String;
A1: Integer;
--------------------------
On button event :
---------------------
  idHttp1:=TIdHTTP.Create(self);
  ThePage:=idHttp1.Get(Edit1.Text); <----- Here you will insert the address (http:\\www.google.com) Dont forget 'http:\\'
  Memo1.Lines.Add(ThePage);

For A1:=0 to  Memo1.Lines.Count-1 do
Begin
 Load:=Memo1.Lines.Strings[A1];
 If Pos('Value=',Load)<> 0 then    Memo2.Lines.Add(Copy(Load,Pos('Value=',Load)+6,9));
End;


Hope this works :P
0
 

Author Comment

by:65zgtre45rr
ID: 16626160
It works i only need to change a liittle bit :)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

571 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