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).