Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. curl -X PUT --header 'Accept:application/json; charset=utf-8' http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/encoder2/actions/restart --digest -u "user:password"
  2.  
  3. <?php
  4. $url = 'http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/mystream/actions/restart';
  5. $username = 'user';
  6. $pass = 'password';
  7. $ch = curl_init();
  8. curl_setopt ( $ch, CURLOPT_URL, "$url");
  9. curl_setopt ( $ch, CURLOPT_POST, 1 );
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11. curl_setopt($ch, CURLOPT_USERNAME, "$username");
  12. curl_setopt($ch, CURLOPT_PASSWORD, "$password")
  13. curl_close ($ch);
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement