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.

Bot sending data to http

Old posts that have not been replied to for several years.
Locked
Z
ZahoOL
Voice
Posts: 7
Joined: Fri May 23, 2003 1:30 am

Bot sending data to http

Post by ZahoOL »

Purpose : Trigger sending http post to website

example : !update1 on channel where bot is will make the bot send 'http://example.com/some_command'' and bot will give msg 'Update Successful'
k
kanibus
Halfop
Posts: 44
Joined: Tue May 03, 2005 7:22 am

Post by kanibus »

you might want to get a little more specific but the http package with tcl should be helpful
Z
ZahoOL
Voice
Posts: 7
Joined: Fri May 23, 2003 1:30 am

Post by ZahoOL »

The main aim of the bot is to use trigger to assign http commands in order to update the server (shoutcast)

Trigger !update , send the following to the server/host

http://server.radio.com:8000/admin.cgi? ... g=[b]name1[/b]&url=http://www.site.com/

Trigger !update1 , send the following to the server/host

http://server.radio.com:8000/admin.cgi? ... g=[b]name2[/b]&url=http://www.site.com/

In the TCL , need to make the bot send the password , in order to run the triggers
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

How far along are you making this script Zahool? You must be doing well so far I haven't seen you ask any questions about how todo anything yet. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Z
ZahoOL
Voice
Posts: 7
Joined: Fri May 23, 2003 1:30 am

Post by ZahoOL »

True Doom , i think this post needs to pe transfered to the Script request section. :)
Z
ZahoOL
Voice
Posts: 7
Joined: Fri May 23, 2003 1:30 am

Post by ZahoOL »

Script completed:

bind PUB -|- !updatesong1 update

proc update {nick host handle chan text} {
#setting server
set server "your.server.com"
#setting port
set port "8000"
#setting password ; generated by //echo $encode(admin:youradminpasshere,m) since i dont know how to do it
set login "yourpassword"
#sending the data
set sock [socket $server $port]
puts $sock "GET /admin.cgi?mode=updinfo&song=title*of*your*song HTTP/1.1"
puts $sock "User-Agent:Mozilla"
puts $sock "Host: $server"
puts $sock "Authorization: Basic $login"
puts $sock ""
flush $sock
#displaying msg
putserv "PRIVMSG $chan : updated your song on the server"
}
putlog "update song loaded"
Locked