Posted on: 06/12/05 07:34pm
By: deek
Posted on: 06/13/05 12:52am
By: machinari
Posted on: 06/13/05 12:56am
By: deek
NAME: Other Side of Special PHONETIC: Other Side of Special COMMENT: AUTH: 1 MAXCLIENTS: 8 VOICECODEC: 0,GSM 6.10 VOICEFORMAT: 3,44100 Hz%2C 16 bit UPTIME: 19591 PLATFORM: Linux-i386 VERSION: 2.2.0 CHANNELCOUNT: 0 CLIENTCOUNT: 0
CLIENTCOUNT: 0
Posted on: 06/13/05 02:40am
By: machinari
function phpblock_voipOutput(){ global $command_output; if(empty($command_output)){ $retval = ''; } else { $pos = strpos($command_output,'CLIENTCOUNT') + 14;//accounts for ': ' $clients = substr($command_output, $pos); $retval = '<p>Clients online: ' . $clients . '</p>'; } return $retval; }I don't know ventrilo so I cant be accurate at all. And I'm not sure how you'll pass your output to the function, but once it's there, something along these lines should help.
Posted on: 06/13/05 03:17am
By: deek
Posted on: 06/13/05 11:42am
By: machinari
Posted on: 06/13/05 05:42pm
By: deek
Posted on: 06/13/05 05:49pm
By: machinari
Posted on: 06/13/05 06:48pm
By: deek
function phpblock_voipOutput(){ global $command_output; $command_output = system("./ventrilo/ventrilo_status -c2 -t127.0.0.1 | grep 'CLIENTCOUNT'"); if(empty($command_output)){ $retval = ''; } else { $pos = strpos($command_output,'CLIENTCOUNT') + 14;//accounts for ': '; $clients = substr($command_output, $pos); $retval = '<p>Clients online: ' . $clients . '</p>'; } return $retval; }
Posted on: 06/13/05 07:19pm
By: Anonymous (mach)
Posted on: 06/13/05 07:32pm
By: deek
//Ventrilo Status function phpblock_voipoutput() { // global $command_output; $command_output = system("/home/tupper/ventrilo/ventrilo_status -c2 -t127.0.0.1 | grep 'CLIENTCOUNT'"); if(empty($command_output)) { $retval = 'NOT ON'; } else { $pos = strpos($command_output,'CLIENTCOUNT') + 14;//accounts for ': $clients = substr($command_output, $pos); $retval = '<p>Clients online: ' . $clients . '</p>'; } return $retval; }
Posted on: 06/13/05 09:22pm
By: machinari
//Ventrilo Status function phpblock_voipoutput() { //system() only returns last line $last_line = system("/home/tupper/ventrilo/ventrilo_status -c2 -t127.0.0.1 | grep 'CLIENTCOUNT'", $count); if(empty($count)) { $retval = '<p>NOT ON</p>'; } else { $retval = '<p>Clients online: ' . $count . '</p>'; } return $retval; }
Posted on: 06/13/05 11:55pm
By: deek
Posted on: 06/14/05 01:24am
By: Anonymous (mach)
//Ventrilo Status function phpblock_voipoutput() { //system() only returns last line system("/home/tupper/ventrilo/ventrilo_status -c2 -t127.0.0.1 | grep 'CLIENTCOUNT'", $count); if(empty($count)) { $retval = '<p>NOT ON</p>'; } else { $retval = '<p> . $count . '</p>'; } return $retval; }just a noob myself yaknow
Posted on: 06/14/05 02:54am
By: deek
//Ventrilo Status function phpblock_voipoutput() { //system() only returns last line $status = exec('./ventrilo_status -c2 -t127.0.0.1 | grep 'CLIENTCOUNT''); if(empty($status)) { $retval = '<p>Server address: www.othersideofspecial.com:3784</p><p><strong><font color="#FF0000">OFFLINE</font></strong></p><p><a href="http://www.ventrilo.com">Get Ventrilo</a></p>'; } else { $retval = '<p>Server address: www.othersideofspecial.com:3784</p><p><strong><font color="#00FF00">ONLINE</font></strong><p>' . $status . '</p><p><a href="http://www.ventrilo.com">Get Ventrilo</a></p>'; } return $retval; }
Posted on: 06/14/05 03:36am
By: machinari
Posted on: 06/14/05 04:13am
By: deek
Posted on: 06/14/05 02:24pm
By: machinari
$status = eregi_replace('CLIENTCOUNT: ', '', $status);
Posted on: 06/14/05 08:10pm
By: deek
//Ventrilo Status function phpblock_voipoutput() { $status = exec('./ventrilo_status -c2 -t127.0.0.1 | grep \'CLIENTCOUNT\''); // Have to put the status variable so that empty() will not return false if noone is logged on $srvstatus = $status; $status = eregi_replace('CLIENTCOUNT: ', '', $status); if(empty($srvstatus)) { $retval = '<p>Server address: www.othersideofspecial.com:3784</p><p><strong><font color="#FF0000">OFFLINE</font></strong></p><p><a href="http://www.ventrilo.com">Get Ventrilo</a></p>'; } else { $retval = '<p>Server address: www.othersideofspecial.com:3784</p><p><strong><font color="#00FF00">ONLINE</font></strong></p><p>Clients Online : ' . $status . '</p></p><p><a href="http://www.ventrilo.com">Get Ventrilo</a></p>'; } return $retval; }