Results 1 to 7 of 7

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

  1. #1

    Post 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

  2. #2
    Join Date
    May 2013
    Posts
    680

    Default

    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

  3. #3

    Default

    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
    Last edited by vicheacheth; 09-18-2013 at 12:45 AM.

  4. #4

    Default

    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) . "<br/>";
    print "Output:" . $result. "<br/><br/>";

    curl_close($ch);

    ?>
    Please help !

  5. #5
    Join Date
    May 2013
    Posts
    680

    Default

    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.

  6. #6

    Default

    Dear Matt,

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

    Thanks for support

  7. #7
    Join Date
    Sep 2011
    Posts
    1,933

    Default

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

    Jason

Similar Threads

  1. http://IP:8086/connectioncounts stop working
    By zuperhost in forum Server Administration Discussion
    Replies: 1
    Last Post: 09-10-2014, 04:56 AM
  2. Replies: 2
    Last Post: 10-23-2013, 09:38 AM
  3. http://IP:8086/connectioncounts Question
    By tribalhost in forum Server Administration Discussion
    Replies: 5
    Last Post: 05-15-2013, 04:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •