Questions about http://[wowza-ip]:8086/serverinfo

Dear Guys,

I’m still not get enough full skill with Wowza, so I’m gonna ask you some questions about http://[wowza-ip]:8086/serverinfo

  1. If there any way to get the server detailed from http://[wowza-ip]:8086/serverinfo

  2. Relate to 1) can I filter the data from Application/…/IP and Referrer in this URL by using PHP script or other language. I’m not good at programming, so I wish please show me some codes to filter the data from this URL.

Thank you.

Best Regards,

Vichea

Hello,

  1. The output is provided as xml so you can use any external script to query the http provider (using digest authentication) and parse the data.

  2. One thought would be that you can use php-curl to initiate the request and obtain the data. Then you can possibly parse it with simplexml_load_string().

Matt

Hi,

Thanks for the update, I’m glad this is now working as expected.

Jason

I’m not following, are you missing data in the return? That looks as though it should work albeit you can technically use CURLAUTH_DIGEST since that is the type of auth being used.

Dear Matt,

This is my PHP code that I use php-curl library. It works with any URL, but the problem is it didn’t work with http://[wowza-ip]:8086/serverinfo it keeps show blank.

Do you have any idea about this? Is there anything wrong?

<?php #username, password, and location are example $username='myusername'; $password='mypassword'; $location='http://www.wowza.com'; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,$location); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_USERPWD,"$username:$password"); curl_setopt($ch,CURLOPT_TIMEOUT,10); $result=curl_exec($ch); echo $result; ?>

Best Regards,

Vichea

Dear Matt,

These code are working now, but there still problem that there are missing data didn’t display like Referred:

<?php $url = "http://wowza-ip:8086/serverinfo/"; $username = 'username'; $password = 'password'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $result = curl_exec($ch); print "Error:" . curl_error($ch) . "
"; print "Output:" . $result. "

"; curl_close($ch); ?>

Please help !

Dear Matt,

Now it working after I save the content to text file.

Thanks for support