# A way to find the server start time in PHP

**URL:** <https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311>\
**Category:** Wowza Streaming Engine\
**Created:** [November 20, 2014, 5:45pm UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311 "2014-11-20T17:45:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marius\_Rusu](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Marius\_Rusu](https://community.wowza.com/u/Marius_Rusu)\
**Post date:** [November 20, 2014, 5:45pm UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311/1 "2014-11-20T17:45:13Z")

</div>

Hi,

I hope this is the correct topic to post this question.

We are using version 4.0.4. of Wowza Streaming Engine and I am wondering if there is any way we can get the server start time so we can use it in PHP script. Searched a little about this but found nothing which could help.

So, is there any possibility to get this info by API or other method?

Thanks.

---

<div class="post-metadata">

**Author:** ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)\
**Post date:** [November 20, 2014, 6:11pm UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311/2 "2014-11-20T18:11:16Z")

</div>

You could use [http://server:8086/serverinfo](http://server:8086/serverinfo) and parse WowzaStreamingEngine/VHost/TimeRunning; it gives you the number of seconds the VHost has been running, which is more or less the same as how long the Server has been running. Alternatively, you could develop a custom module that pulls the required information via the API.

---

<div class="post-metadata">

**Author:** ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)\
**Post date:** [November 21, 2014, 8:55am UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311/3 "2014-11-21T08:55:44Z")

</div>

The credentials are stored in /conf/admin.password - or you can use the Engine Manager’s user management (under Server \> Users) to manage this. If you look at conf/VHost.xml at the definition of the admin hostport, you’ll see a HttpProvider with RequestFilter “serverinfo\*” and its AuthenticationMethod is “admin-digest”. That’s for DIGEST authentication; you can change it to “admin-basic” for BASIC authentication, or to “none” for no authentication at all.

---

<div class="post-metadata">

**Author:** ![Marius\_Rusu](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Marius\_Rusu](https://community.wowza.com/u/Marius_Rusu)\
**Post date:** [November 21, 2014, 9:33am UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311/4 "2014-11-21T09:33:32Z")

</div>

Thanks for your answer. It seems exactly what we need, but, I only have one more question. How shall we send the login credentials for [http://server:8086/serverinfo?](http://server:8086/serverinfo?)

A login is required in order to be able to access the info.

Thanks.

---

<div class="post-metadata">

**Author:** ![Marius\_Rusu](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Marius\_Rusu](https://community.wowza.com/u/Marius_Rusu)\
**Post date:** [November 21, 2014, 10:01am UTC](https://community.wowza.com/t/a-way-to-find-the-server-start-time-in-php/44311/5 "2014-11-21T10:01:21Z")

</div>

Thanks. It helps us a lot!
