php service startup date or timestamp?

Marco

New member
Alright I want to calculate the server up-time without losing much efficiency doing this.

I was wandering if there is a global variable that holds the hosting's program ( normally apache ) that holds the start-date/time stamp of the service.

otherwise, what method could I perform to achieve the same?
(mysql database may be used)
 
No, PHP doesn't have a way of tracking this, unless you write a script to do so. However, Apache logs all activity, including startup and shutdown. You would have to ask the hosting company is there's a way to access this in the logs (if it's not your server). Then, you can write a PHP script to calculate the uptime.
 
Back
Top