excuse is mistaken to me.
I have put in phpinclude_start the script:
//Whois on line in irc code - remote http, no db access beta 2.0.0
//check the url exists to save crashing or end of the world
//main routine
$onlinefile = "http://www.pennyshell.net/~playanueva/chat.txt"; //path to online users file
$killname = array("PlayaBoT", "PlayaBoT_"); //kill name array to hide users online - all users name with 'bot' and '_' at the end wont display
$httpfaulttime = 5; //number of seconds before vB decides the bots web server has died
function urlExists($url)
{
$url = ereg_replace("http://", "", $url);
list($domain, $file) = explode("/", $url, 2);
// change the last number below to the timeout you prefer for contacting the server
$fid=fsockopen($domain,80, $errno1, $errstr1,$httpfaulttime);
@fputs($fid,"GET /$file HTTP/1.0\r\nHost: $domain\r\n\r\n");
@$gets = fgets($fid, 1024);
@fclose($fid);
if (ereg("HTTP/1.1 200 OK", $gets)) return TRUE;
else return FALSE;
}
//main routine
if (!urlExists($onlinefile)) {
$chatterson ="IRC Server Fault.\n";
$onlineirc="0";
}
else {
$file = fopen($onlinefile, "r");
while (!feof($file)) {
$buffer .= fgets($file, 4096);
}
fclose($file);
$buffer = strip_tags ($buffer); //get rid of any php or html tags etc
$buffer = chop($buffer); //get rid of the white space
$chatterson ="";
/// routine for placeing the user details into an array and getting online numbers
$temparray = explode ("%20", $buffer);
$temparraysize = sizeof ($temparray);
$k = 0;
for ($i = 0; $i < $temparraysize; $i+=3) {
$bufferarray[handle1][$k] = ($temparray[$i]);
$bufferarray[host][$k] = ($temparray[$i+1]);
$bufferarray[nick][$k] = ($temparray[$i+2]);
$k+=1;
}
$bufferarraysize = (sizeof ($temparray)/3);
$onlineirc = ($bufferarraysize);
$buffercount=0;
//setting the user modes according to the flags set in the nick
for ($buffercount=0; $buffercount < $bufferarraysize; $buffercount++) {
$tempbuff=$bufferarray[nick][$buffercount];
foreach ($killname as $kilvalue) {
if (eregi($kilvalue, $tempbuff)) {
$onlineirc=$onlineirc-1;
$bufferarray[nick][$buffercount] = "";
continue ;
} } }
unset($chatterson);
for ($i = 0; $i < $bufferarraysize; $i++) {
if (!$bufferarray[nick][$i] == "") {
if (!$chatterson == "") {
$chatterson = $chatterson.", ".$bufferarray[nick][$i];
}
else { $chatterson = $bufferarray[nick][$i]; }
}}
}
but nothing to make in the window does not appear the user of
the chat.txt
thanks
jancarlo
Italian
scusa mi sono sbagliato.
ho messo in phpinclude_start lo script:
*****************************
ma niente da fare nella finestra non compaiono gli user del chat.txt
grazie
jancarlo
|