Using .htaccess 












Using .htaccess/.htpasswd Password Protection 





Coding Tips 








Uploads and Downloads 



Mail 
see it on this page





Working with Images 


Frequently Requested Website Functionality 
see it on this page
see it on this page
see it on this page
see it on this page











Using PHP 




Website Managment 








Other Tips 









Multiple random banners (images)
This script will randomly pick three images from a directory of any mumber of .jpg files. No image will be duplicated (selected twice).
<?php
// set the path where the images reside on the server, include the trailing /
$image_path = $_SERVER['DOCUMENT_ROOT']."/directory/";
// load an array and strip path so you just have the image file names
$image_array = str_replace($image_path,'',glob($image_path.'*.jpg'));
// randomly select the first image
$image1 = $image_array[array_rand($image_array)];
// remove the first image from the array
$image_array = array_merge(array_diff($image_array,(array)$image1));
// randomly select the second image
$image2 = $image_array[array_rand($image_array)];
// remove the second image from the array
$image_array = array_merge(array_diff($image_array,(array)$image2));
// randomly select the third image
$image3 = $image_array[array_rand($image_array)];
// replace this line with your html image tags after testing
echo "$image1<br>$image2<br>$image3<br>";
?>
