Ive got a busy site which keeps taking down the server.
What is an easy piece of PHP code that can look at the server load, if the server load variable set to say 2, then when load is above two – It will produce a page for the user – Server overloaded.
Does anyone know where to find such an easy piece of code?
It will die if the load is above 80%.
However, this is not supported on Windows platforms:
Ref. : PHP.net : sys_getloadavg