php script works if someone request it right? so how i can make php script delete files after 1h for example without need to wait someone to request the script.
Consider a cron job on your server. You can either use that to call a php script that deletes file of x time old or write a bash script to do it. No additional action would then be required.