I've made recently a script for showing random pictures, The thing is that i want the script to show Random picture every specific time , like in 5 minutes, in 15 and in 30, How can it be done, And what do i need to add to my script to improve the script to be working by random timing? The script is being used in WordPress with the "allow php in post" plugin. The script is - $total = "2"; $file_type = ".jpg"; $image_folder = "(images source)"; $start = "1"; $random = mt_rand($start, $total); $image_name = $random . $file_type; echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\ />"; Thanks from ahead, And waiting for a reply and help. Thank you.