Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
919 B

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. //require 'class.ponvif.php';
  3. require 'toto.php';
  4. //$onvif = new Ponvif();
  5. //$result = $onvif->discover();
  6. //var_dump($result);
  7. //exit();
  8. $test=new ponvif();
  9. $test->setUsername('gagua');
  10. $test->setPassword('4GetMyID');
  11. $test->setIPAddress('192.168.0.109');
  12. try {
  13. $test->initialize();
  14. if ( $test->isFault($sources=$test->getSources())) die("Error getting sources");
  15. //print_r( $sources );
  16. $profileToken=$sources[0][0]['profiletoken'];
  17. $ptzNodeToken=$sources[0][0]['ptz']['nodetoken'];
  18. //echo "Media: " . $test->media_GetStreamUri($profileToken) . "\n\n";
  19. //echo "Snapshot: " . $test->media_GetSnapshotUri('Profile_2') . "\n\n";
  20. //$PAPA = $test->media_GetVideoSources();
  21. $test->ptz_AbsoluteMove( "Profile_1", 1, -1, 0);
  22. $test->ptz_GetStatus("Profile_1");
  23. //var_dump( $PAPA );
  24. } catch (Exception $e) {
  25. echo 'Caught exception: ', $e->getMessage(), "\n";
  26. }
  27. ?>