This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

TCL code for finding info on a webpage (high scores)

Old posts that have not been replied to for several years.
Locked
i
iharrington

TCL code for finding info on a webpage (high scores)

Post by iharrington »

I just want a way for people to type (I can do this part once I can get the data into my system, got a way to list as much as I can add via /notice or ctcp methods) !highscore where then the top 100 is listed. Yet obtaining the data from the website is eluding me.

I found this:
proc pub:whats { nick uhost hand chan arg } {
if {[llength $arg]==0} {
putserv "notice $nick :Usage : !whats <web site>"
} else {
set host [lindex $arg 0]
set query "http://www.netcraft.com/oldwhats/?host=$host"
set token [http::config -useragent "Mozilla"]
set token [http::geturl $query]
puts stderr ""
upvar #0 $token state
foreach {name value} $state(meta) {
if {$name == "Server"} {
putserv "notice $nick :Host $host is running $value"
}
}
}
return 0
}
Yet this appears to be totally different. I have about given up hope to find what I need... anyone got suggestions?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

That example is parsing the http response headers. You should find an example that uses the actual webpage data.
i
iharrington

ok, lol

Post by iharrington »

umm, yeah, I realized this, but I could not find one.... :P
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Try the script archive on this site. There are plenty of scripts that download web pages and parse the results. Weather scripts, stock quotes, google search results, etc.
Locked