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.

33 lines
1.0 KiB

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
6 years ago
​
​
​
​
​
​
​
​
​
​
​
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->setUsername('admin');
  11. $test->setPassword('4GetMyID');//109
  12. //$test->setIPAddress('192.168.0.109');
  13. $test->setIPAddress('192.168.200.106');
  14. try {
  15. $test->initialize();
  16. if ( $test->isFault($sources=$test->getSources())) die("Error getting sources");
  17. //print_r( $sources );
  18. $profileToken=$sources[0][0]['profiletoken'];
  19. $ptzNodeToken=$sources[0][0]['ptz']['nodetoken'];
  20. //echo "Media: " . $test->media_GetStreamUri($profileToken) . "\n\n";
  21. //echo "Snapshot: " . $test->media_GetSnapshotUri('Profile_2') . "\n\n";
  22. //$PAPA = $test->media_GetVideoSources();
  23. //$test->ptz_AbsoluteMove($profileToken, -1, -1, 0);
  24. //$PAPA = $test->ptz_GetStatus($profileToken);
  25. $test->ptz_ContinuousMove( $profileToken, -0.2, 0 );
  26. //var_dump( $PAPA );
  27. } catch (Exception $e) {
  28. echo 'Caught exception: ', $e->getMessage(), "\n";
  29. }
  30. ?>