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.
Old posts that have not been replied to for several years.
M
MaNDaRK
Post
by MaNDaRK » Wed Oct 16, 2002 11:03 am
Hello,
I want to get the data from a file on a webserver, and the data must been shown in the channel with a trigger
Example:
Tigger: !post
Shows the data of:
http://test.server.nl/test.php
(The data contains more then one line)
Can you help me with that? ty!
(I tried this:
Code: Select all
package require http
bind pub - !post pub:post
post pub:post { nick uhost handle channel arg } {
set query ["http://test.server.nl/test.php"]
set token [http::geturl $query]
upvar #0 $token state
putserv "PRIVMSG $channel :$token"
}
putlog "*** WebGet Script loaded ***"
)
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Wed Nov 06, 2002 3:12 pm
Since it's more than 1 line, you have to use multiple putservs. You can only send 1 line per privmsg, right? So use 'split' to turn the data into a list. Then use a loop to output each line with putserv.