| View previous topic :: View next topic |
| Author |
Message |
TheOne1337 Voice
Joined: 14 Aug 2006 Posts: 5
|
Posted: Mon Aug 14, 2006 1:32 pm Post subject: Information from web |
|
|
Hi
I have one PHP file in my server and it contains one line text. It is good in the way it is in the file so only thing what TCL has to do is:
When somebody says in channel !example then bot says text from PHP file to channel.
I don't have very good english, but i'll hope that somebody understands.
Best Regards
Bert |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Aug 14, 2006 3:39 pm Post subject: |
|
|
| Code: |
bind pub - !example my:example
proc my:example {nick uhost hand chan text} {
set url "http://your.web.server/page.php"
set token [::http::geturl $url]
set content [::http::data $token]
::http::cleanup $content
foreach line [split $content \n] {
putserv "PRIVMSG $chan :$line"
}
}
|
Something like this anyway. Use this as an example. Use the search function to find more examples related to this subject. If you (or anyone else) got any questions feel free to ask (just reply). _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
TheOne1337 Voice
Joined: 14 Aug 2006 Posts: 5
|
Posted: Mon Aug 14, 2006 11:17 pm Post subject: |
|
|
| Big big big thanks! It worked perfectly. |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Tue Aug 15, 2006 12:00 pm Post subject: |
|
|
how can i make that tell the users online from a forum _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Aug 15, 2006 5:01 pm Post subject: |
|
|
TheOne1337: You'r welcome.
monie089: in your case *erase* (using regsub for instance) the crap you don't want. Example:
| Code: |
regsub -all {<[^>]+>|<} $content { } content
|
Use it (the code I've posted above) as an example. Use the search function to find other discutions on this subject. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
monie089 Halfop
Joined: 29 Jul 2006 Posts: 76
|
Posted: Wed Aug 16, 2006 12:29 pm Post subject: |
|
|
ok thanks _________________ New server irc.NintendoXG.com come and visit |
|
| Back to top |
|
 |
DJmart Voice
Joined: 08 Mar 2006 Posts: 21
|
Posted: Wed Aug 30, 2006 7:40 pm Post subject: |
|
|
How can I edit that so it PM's or notices the user?
Thanks. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Wed Aug 30, 2006 8:48 pm Post subject: |
|
|
Change:
| Code: | | putserv "PRIVMSG $chan :$line" |
To:
For PM:
| Code: | | putserv "PRIVMSG $nick :$line" |
For Notice:
| Code: | | putserv "NOTICE $nick :$line" |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Justdabomb2 Voice
Joined: 29 Sep 2006 Posts: 37 Location: United States of America
|
Posted: Fri Sep 29, 2006 11:17 pm Post subject: Game Stats |
|
|
nvm *edited*
I got help
~Thanks caesar _________________ Yeah! |
|
| Back to top |
|
 |
|