1
I’m looking for a way to limit the use of a script for a certain time, good as said in another question I don’t want to use events
mysql.
Searching, researching, trying to do, I found this in the documentation, Sleep Function She says the following:
Sleep - Delay script execution
It’s not well documented as far as I’m concerned, but down below there are a few examples made by contributors.
How this function actually works?
Note: This question is different from this. Limit quantity by time
As the documentation itself says, the function Sleep delays script execution, see this example.
– NoobSaibot
In case I could use this function Sleep to limit the use of a button?
– user94336
No, I think the ideal would be to hide this button because this function will not prevent the user from clicking again on the button.
– NoobSaibot
I understand, I’ll see what I can do, but I think that when I click I will have to wait the finished time for me. I hide the button and at the end of this time show me again.
– user94336
Yes, if you’re using Ajax functioned.
– NoobSaibot
Yes I will use ajax, by the way I’m already doing;
– user94336
What is not written there is that almost every time the function is used is doing something wrong. This is asking to take DOS attack. And if you want to change the behavior of something in the client you have to touch it and not the server. Not that this cannot be circumvented.
– Maniero
Research upon research I came to the conclusion that what the miner said is true.
– user94336
Wow brother, why did you remove the question there? It didn’t work?
– Sam
@I thought I’d end up polluting but I’ll reopen
– user94336