Using .htaccess 












Using .htaccess/.htpasswd Password Protection 


php5
php5
Coding Tips 






Uploads and Downloads 

php5
php5
php5
Mail 



php5


Working with Images 


Frequently Requested Website Functionality 
php5
php5

php5 see it on this page
php5








Using PHP 
php5
php5
php5


Website Managment 







php5

php5
Other Tips 







Delete session files
If you are using a custom php.ini file to specify a user directory where session files are stored, this script can be used to delete old session files (the system will not purge them, so the directory will keep growing if you do not delete them). You must change the $sessionDir variable to the path where your session files are stored, and you can adjust the delete time frame as well (the example below uses 3 hours - you would not want to delete an active session). You can run this script directly or set it up to run at specific time intervals using cron.
<?php
$sessionDir = "/home/user/temp/"; // your sessions directory
$compareTime = time() - 10800; // 3 hours
$count = 0;
foreach (glob($sessionDir . "*.sess") as $file)
if ($compareTime >= filemtime($file))
if (unlink($file)) $count++;
echo "$count session files were deleted";
?>