open file in vi and type :%s/(ctrl-v)(ctrl-m)//g and press enter key
This is a small PHP-CURL script, initiates a JSON request to Wowza API to get the realtime status of a STREAM file. Note that the request is protected by Wowza 'AUTHENTICATION - DIGEST' Mechanism. ********************************************************************** $wowzaip = '192.168.166.68'; //replace with your wowza ip address $application = 'live'; //replace with your application name $streamfile = '10-20160527134707366114.stream'; //replace with your streamfile //initiate a curl session $ch = curl_init(); //set http header to json curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json')); //set wowza request url curl_setopt($ch, CURLOPT_URL, 'http://'.$wowzaip.':8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/'.$application.'/instances/_definst_/incomingstreams/'.$streamfile.'/monitoring/current'); //set RETURNTRANSFER true. Now return as string instead of output curl_setop...
Comments
Post a Comment