Hello friends
Any command api wowza for restart application?
->
I would like to ask how to restart wowza single application from command line in PHP
Hello friends
Any command api wowza for restart application?
->
I would like to ask how to restart wowza single application from command line in PHP
Hi @LogicaHost Solucoes here it is
<?php
function wowzaAppOperation($appName, $operation)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/" . $appName . "/actions/" . $operation);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = "Accept: application/json; charset=utf-8";
$headers[] = "Content-Type: application/json; charset=utf-8";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
return $result;
}
echo wowzaAppOperation("live", "restart");
?>
also you can call wowzaAppOperation(“live”,“shutdown”)
wowzaAppOperation(“live”,“shutdown”) or wowzaAppOperation(“live”,“start”)