I'm making a website, and when the PHP-script add's a new entry to the database, I want to have a snippet in the PHP that send a msg to my eggdrop.
Can someone make a easy script with a password protection. Also, the php needs to send a password to verify.
Thanks
Edit: Sorry for misunderstandings, but I'm actually requesting a TCL-script to communicate with PHP.
I have this PHP-script:
Code: Select all
<?php
$botip = "127.0.0.1";
$botport = "22739";
$socket = fsockopen ($botip, $botport, $error, $errorstr, 60);
$line = "Hei";
if ( $socket ) {
while ( !feof($socket) ) {
$str = fgets($socket, 4096);
if ( strcmp($str, "go") ) {
#$out .= substr( $str, strlen($control)+1 );
fputs($socket, $line . "\n");
}
}
}
fclose($socket);
?>
Code: Select all
listen 22739 script listener pub
proc listener {idx} {
control $idx listenerin
putdcc $idx "go\n"
}
proc listenerin {idx args} {
putlog $args
putserv "PRIVMSG #chan : $args"
}
Code: Select all
[17:44] Telnet connection: localhost/39894
[17:44] Timeout/EOF ident connection
[17:44] Hei
I want to compare a password-string the php script sends to tcl in the tcl script, and only allow scripts with the correct password.