<?
require_once ( "users-online.php" );
//
// check if the user is behind an http proxy
//
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
$IP_ADDR = getenv( 'HTTP_X_FORWARDED_FOR' );
}
else if ( getenv( 'HTTP_CLIENT_IP' ) ) {
$IP_ADDR = getenv( 'HTTP_CLIENT_IP' );
}
else {
$IP_ADDR = getenv( 'REMOTE_ADDR' );
}
list($myip, $mypi) = explode(",",$IP_ADDR);
$o_user = new users_online ( $myip ); // create the object and send user's IP
$o_user->main (); // call the "main" method
?>
<table border="0" width="100%"><tr><SUP><b>Users online:</b> <?= $o_user->count (); ?></SUP></td><td><SUP><b>Your IP:</b> <?= $myip; ?></SUP></td></tr></table>
|