egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

script: page.tcl, html 2 channel, using !cmd args as input

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
vbirc
Voice


Joined: 20 Oct 2009
Posts: 2

PostPosted: Tue Oct 20, 2009 8:58 am    Post subject: script: page.tcl, html 2 channel, using !cmd args as input Reply with quote

I don't know how to call the thread title, I am sorry for picking an undescriptive title.

Situation: !<cmd> <args> (empty args = help)
#chat
<user1> !cmd beep
(bot recognized beep as args for cmd, loads web site page with: site.com/script/page.php?args=beep)
php script: page.php
<?php
$output = ''; //start empty
if (!empty($_GET['args']))
{ // isnot empty get args
// my php & sql query here giving $phpsqlresult
$output .= 'your args is $_GET['args'] and result is: $phpsqlresult';
}
else
{
// args was empty, show help
$output .= 'do !cmd value, like !cmd beep';
}
echo $output;
?>
ok, so at this point, the bot has the script, listens to !cmd and when provided, goes to site and does whatever it needs to do, the page echo's out something. WHATEVER that is, the whole page has to be spit out back to the channel. Showing back to the user

<bot1> your args is beep and result is: entry beep found in database
(or else, <bot1> do !cmd value, like !cmd beep)

So what I am requesting is a script that listens for pubcmd !cmd with args and proc that goes out to web page using args, and whatever the result is, (there will be no html/body/divs/table or other html tags, just the echo output) spit it back out to the channel.

I tried understanding examples, maybe i just haven't found the right one, and i have tried rewriting existing scripts, but always failed.

I am hoping someone can do this. you can test with: vbirc.com/bot/index.php?do=$args if you want, for security reasons it will only accept beep and sheep (?do=beep).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber