SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
read some info on web pages....

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
read some info on web pages....
Author Message
yann



Joined: 15 Jun 2001
Posts: 9

Post read some info on web pages.... Reply with quote

How can I read a info and memorize it from a web page ?
THANKS!

Fri Jun 15, 2001 8:38 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: read some info on web pages.... Reply with quote

What do you mean by INFO, part of HTML text?
Have you tried WebGetPage?

: How can I read a info and memorize it from a web page ?
: THANKS!

Fri Jun 15, 2001 8:46 am View user's profile Send private message
yann



Joined: 15 Jun 2001
Posts: 9

Post Re: read some info on web pages.... Reply with quote

: What do you mean by INFO, part of HTML text?
: Have you tried WebGetPage?

yes, I've try WebGetPage, but in fact I just want to put in string variables part of HTML text. thanks for your help.

Mon Jun 18, 2001 4:07 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: read some info on web pages.... Reply with quote

After WebGetPage you can use FileReadAll to load the file into a string variable. From the variable you can take only pieces you want, you may need to do search in the string in order to find the desired text. For the search use InStr statement.

: yes, I've try WebGetPage, but in fact I just want to put in string variables
: part of HTML text. thanks for your help.

Mon Jun 18, 2001 8:40 am View user's profile Send private message
yann



Joined: 15 Jun 2001
Posts: 9

Post Re: read some info on web pages.... Reply with quote

If, for exemple, I just want to know an e-mail adresse contained in the file, I looking for an '@', and then, how can I do to memorize my adresse into a string variable,

thanks.

Tue Jun 19, 2001 6:39 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: read some info on web pages.... Reply with quote

**********************************************************************
Hope you will not use this script to collect unauthorized email addresses!
**********************************************************************

Example:
// load page into a string variable
Dim( HTML, string )
WebGetFile( "http://www.some_site/some_page.html";, "c:\\temp\\temp.htm" )
FileReadAll( "c:\\temp\\temp.htm", HTML )

// find email
Dim( pos, number )
Dim( email, string )
InStr( HTML, "mailto:", 1, pos )
If( pos, FOUND, NOT_FOUND )
FOUND:
Add pos, 6, pos
Mid( HTML, pos, 100000, HTML )
// find next space character or double-quote or whatever
// ...change it here if you have a different character in your HTML
InStr( HTML, " ", 1, pos )
If( pos, FOUND, NOT_FOUND )
FOUND2:
Minus( pos, -1, pos )
Left( HTML, pos, email )
... now do something with the found email ...
NOT_FOUND:

**********************************************************************
Hope you will not use this script to collect unauthorized email addresses!
**********************************************************************

: If, for exemple, I just want to know an e-mail adresse contained in the file,
: I looking for an '@', and then, how can I do to memorize my adresse into a
: string variable,

: thanks.

Tue Jun 19, 2001 8:32 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.