ini_set('memory_limit', '96M');
ini_set('max_execution_time', 90);
// Your DATABASE username
$dbuser = 'ratzrusc_ratzrus';
// Your DATABASE password
$dbpass = 'X753gMmoh2ZX92j';
//DATABASE Name
$dbname = 'ratzrusc_ratzrus';
// Haqbahu Hit Counter Directory Path if required like: /home/cpanelusername/public_html/haqbahuMostOnline/
$hitcdpath = '/home/ratzrusc/public_html/new/theme/online/';
//Add above and Run install.php file in your browser like: www.yourwebname.com/haqbahuMostOnline/install.php
/**
*
* HAQBAHU WHO'S ONLINE & MOST ONLINE Version 1.0
* Copyright 2010 (c) hazratsultanbahu.com
* http://www.hazratsultanbahu.com/scripts
*
*/
//Optional Database Connection Information
//**First Edit the config.php file values to active database connection**
//After editing “config.php” file copy and past in the place of bellow line, with out first and last line
// Don’t edit any Below line of this file
$dbh=mysql_connect ("localhost", "$dbuser", "$dbpass") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("$dbname");
//Fetch Time
$timestamp = time();
$timeout = $timestamp - 900;
//Insert User
$insert = mysql_query("INSERT INTO haqbahuonline (timestamp, ip, file) VALUES('$timestamp','".$_SERVER['REMOTE_ADDR']."','".$_SERVER['PHP_SELF']."')") or die("Error in who's online insert query!");
//Delete Users
$delete = mysql_query("DELETE FROM haqbahuonline WHERE timestamp<$timeout") or die("Error in who's online delete query!");
//Fetch Users Online
$result = mysql_query("SELECT DISTINCT ip FROM haqbahuonline") or die("Error in who's online result query!");
$users = mysql_num_rows($result);
$data = mysql_query("SELECT * FROM haqbahumost") or die("Error in who's online result query!");
while($result = mysql_fetch_array( $data ))
{
$gotmost=$result['lmost'];
$he=$result['ho'];
}
if($gotmost<$users)
{
mysql_query("TRUNCATE `haqbahumost`");
$insert = mysql_query("INSERT INTO haqbahumost (`id`, `lmost`) VALUES ('$id', '$users')") or die("Error in who's online insert query!");
} else {
print("\n");
}
$get = mysql_query("SELECT * FROM haqbahumost") or die("Error in who's online result query!");
while($result = mysql_fetch_array( $get ))
{
if ($result['lmost'] < 76)
$mmost='76';
if ($result['lmost'] > 76)
$mmost=$result['lmost'];
echo "