, ?
    ~
Advanced Hosters -

Yabuti
V.I.P.
: 28.11.2008
: 11275
Contest (: 2)
# : 14, 2011 3:56 pm
!
- : 4
, (joomla 1.5).
.

, " 4 ", php- JS.

!
PQCService.net 7 , icq: 87244588
EvaPharmacy. , ! Jabber: [email protected] ICQ: 750000

Codd
: 13.01.2011
: 186
# : 14, 2011 7:29 pm
http://subscribe.ru/archive/inet.webbuild.phpinfo/200705/31140540.html

:
<?php
session_start();
define("MAX_IDLE_TIME", 3);
function getOnlineUsers(){
if ( $directory_handle = opendir( session_save_path() ) ) {
$count = 0;
while ( false !== ( $file = readdir( $directory_handle ) ) ) {
if($file != '.' && $file != '..'){
if(time()- fileatime(session_save_path() . '\\' . $file) < MAX_IDLE_TIME * 60) {
$count++;
}
} }
closedir($directory_handle);
return $count;
} else {
return false;
}}
echo ' : ' . getOnlineUsers() . '<br />';
?>

    ~