Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Tools

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 09-18-2008, 03:18 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Spoon,

Thank you for that it looks perfect, but I am having issues integrating it. I tried to use the top part of the above script for the connection and authentication but it errored out at the beginning of your script. Here is what it looks like, I am sure I am doing something wrong.

PHP Code:
<?php
class telnet {

    
// Variables
    
var $message = array();
    var 
$connection;

    
// Connects to the World Telnet Server
    
function connect(){
        global 
$cfg;
        
        
// Open Socket Connection
        
$this->connection fsockopen('192.168.0.4'9000);

        if(!
$this->connection){
            
$this->message[] = "Error connecting to World Telnet Server";
            return 
false;
        }else{
            
fputs($this->connectionsprintf("%s\r"'username'));
            
usleep(125000);   
              
fputs($this->connectionsprintf("%s\r"'password'));
            
usleep(125000);
            return 
true;
        }
    }

$telnet = new telnet;
if(
$telnet->connect() ) {
    
// We are connected... yay!
    
echo "<h1>Server is <span style='background-color:green;'>UP</span></h1>";
    echo 
"<p>" $telnet->uptime() . "</p>";
    echo 
"<table><tr><td>Name</td><td>Zone</td></tr>";
    
$players $telnet->whoall();
    foreach( 
array_keys($players) as $key) {
        echo 
"<tr><td>" $players[$key]['Name'] . "</td><td>" $players[$key]['ZoneLong'] . "</td><tr>";
    }
    echo 
"</table>";
} else {
    
// OH NOS!
    
echo "<h1>Server is <span style='background-color:red;'>DOWN</span></h1><p>" $telnet->message[0] ."</p>";
}  
?>

And the error i get if I run php eqstatus.php from a command line on the server.

Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /var/www/localhost/htdocs/game-servers/eq/status/eqstatus.php on line 27
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:13 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3