Projects
EZ_Login ver 11.9.2009
It finaly works! It's been sitting on this site broken for about 2 years, but I fixed it and it will work. A Feature rich object based php login includes super admins, delete users, 4 security levels, redirects, users online counter and a new banning feature. Many flaws from the beta version have been corrected. No programming knowledge recquired to use and operate also absolutely free, enjoy.
I've developed a free and easy to install login system that will dynamically create a mysql table and have a complete working login in minutes. Simply download the login script and follow the instructions in the readme file.
Total downloads: 504 for EZ_login.
Here's a working example.
| EZ_Login |
|---|
|
Users online: 0 |
| ver - 11.9.2009 |
Users online generator
Users Online Generator
Identifies how many people (via IP's) are viewing the current web-site at the given time.
<?php
###############################################
###
### Users online script
### ver. 8/26/07
###
### Requires php write permissions
### on web server. Creates a file named
### usersonline.txt as a database to track ip
### addresses and a timestamp. Users that have
### a time stamp older than 15 minutes will
### be deleted and shown as offline.
###
###############################################
$minutes = 15; // Minutes till user times out and isn't listed as online.
$ip = $_SERVER['REMOTE_ADDR'];
$filename = "usersonline.txt";
if (is_writable($filename)) {
$ticker = 1;
$handle = fopen($filename, "r");
if (filesize($filename) > 0) {
$contents = fread($handle, filesize($filename));
fclose($handle);
}
$handle = fopen($filename, "w");
$iptime = $_SERVER['REMOTE_ADDR']."@@@@".time()."****";
$seperate = explode("****", $contents);
$unique_ip = $_SERVER['REMOTE_ADDR'];
$counter_seperate = count($seperate);
for($i=0; $i < $counter_seperate; $i++) {
if (ereg("^$unique_ip", $seperate[$i])) {
unset($seperate[$i]);
}
}
$remote_addr = array();
$time_out = array();
foreach ($seperate as $value) { // Split the array by IP and last page refresh.
list($remote_addr[], $time_out[]) = split('@@@@', $value);
}
if (count($remote_addr) == count($time_out)) {
$duration = $minutes * 60; // 15 minutes time_out
$counter = count($remote_addr) - 1;
for ($i=0; $i < $counter; $i++) {
if ((time() - $time_out[$i]) <= $duration) {
$online .= $remote_addr[$i]."@@@@".$time_out[$i]."****";
$ticker++;
}
}
$online .= $iptime;
}
if (fwrite($handle, $online) === FALSE) {
echo "File: $filename cannot be written too.";
exit;
}
fclose($handle);
}else{
echo "The $filename is not writable.";
}
echo $ticker;
?>
- Blaise Pascal
Site is currently under construction and redesign. There may be errors.