so, i want to do something like this: when you open php file, after 20 second file insert some information in database. how i can to do this? thank you
I'm assuming you mean after the page was already sent to the user. If i'm right, then PHP is not the answer. You need some AJAX (javascript) code to run on the client (user) side and will be executed after 20 seconds (easily done with javascript timeout). After the 20 second the function will make a request to another script (AJAX) that will insert the data you want to the db. Try to look around about AJAX and i'm sure you'll find your answer there.
Can you give us more information on what you are trying to achieve? As mulari, stated, PHP may not be the answer for it. But, under some circumstances (such as a cron), it can be done, depending on what you are trying to do.