11-23-2017, 08:15 +0100
AuthorPost
Mirage  05-19-2004, 18:23   | [TCL] Getting the source code of a web site
Staff
(Moderator)
Member since 01/2004
54 Posts
Location: Zwickau, Germany
This is how to get source code of web site. The following script snippet requires the HTTP package (which is included in TCL 8.0 and any later version).
exec WWW:Main:
1

list must have an even number of elements

list must have an even number of elements
    while executing
"array set STATS $tmp"
    (procedure "WWW::Main" line 21)
    invoked from within
"WWW::Main $argc $argv"



This post was edited 2 times, last on 08-14-2009, 04:22 by thommey
Mettwurst  08-26-2004, 22:02   Homepage
(Moderator)

Avatar

Member since 04/2004
13 Posts
Location: Stuttgart/Germany
another one:
exec WWW:Main:
1

list must have an even number of elements

list must have an even number of elements
    while executing
"array set STATS $tmp"
    (procedure "WWW::Main" line 21)
    invoked from within
"WWW::Main $argc $argv"




same like mirage's but with check if the site exists

Edit: small bugs fixed
This post was edited 3 times, last on 08-14-2009, 04:22 by thommey
Mirage  08-27-2004, 16:52  
Staff
(Moderator)
Member since 01/2004
54 Posts
Location: Zwickau, Germany
Note that putcmdlog is a TCL command of Eggdrop.
sKy\  02-06-2006, 14:55  
(Moderator)

Avatar

Member since 05/2005
8 Posts
Location: Germany, Zeitz
# set website "www.yourhost.com"
# set content [web2data $website]
# returns:
# - if no error: the source of the website
# - if error: 0
exec WWW:Main:
1

list must have an even number of elements

list must have an even number of elements
    while executing
"array set STATS $tmp"
    (procedure "WWW::Main" line 21)
    invoked from within
"WWW::Main $argc $argv"




# same like Mettwurst''s but as proc

[Not loaded: http://sky.tclhelp.net/sky.gif]
This post was edited 1 times, last on 08-14-2009, 04:23 by thommey
Advanced options for this topic:

Ignore this topic (Do not list this topic in the "unread topics" search. You are currently not ignoring this topic.)
Hide this topic (Hidden topics are not displayed in the topics list. This topic is currently not hidden.)
Go to forum

Unclassified NewsBoard 1.5.3-d | © 2003-4 by Yves Goergen