Web Interface For Lite Argus Control modules
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.

40 lines
1.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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('argus');
  11. //$test->setPassword('QNJ9ydwAmmNM8wd');//109
  12. //$test->setIPAddress('192.168.0.109');
  13. //$test->setIPAddress('192.168.200.127');
  14. $test->setUsername('admin');
  15. $test->setPassword('4GetMyID');
  16. $test->setIPAddress('192.168.200.110');
  17. //$test->setAuthMethod( 1 );
  18. try {
  19. $test->initialize();
  20. echo "\n\n\nInit OK\n\n\n";
  21. if ( $test->isFault($sources=$test->getSources())) die("Error getting sources");
  22. print_r( $sources );
  23. $profileToken=$sources[0][0]['profiletoken'];
  24. $ptzNodeToken=$sources[0][0]['ptz']['nodetoken'];
  25. //echo "Media: " . $test->media_GetStreamUri($profileToken) . "\n\n";
  26. //echo "Snapshot: " . $test->media_GetSnapshotUri('Profile_2') . "\n\n";
  27. //$PAPA = $test->media_GetVideoSources();
  28. //$test->ptz_AbsoluteMove($profileToken, 0, 0, 0);
  29. //$PAPA = $test->ptz_GetStatus($profileToken);
  30. $test->ptz_ContinuousMove( $profileToken, -.5, 0 );
  31. sleep(10);
  32. $test->ptz_Stop($profileToken,1,1);
  33. //var_dump( $PAPA );
  34. } catch (Exception $e) {
  35. echo 'Caught exception: ', $e->getMessage(), "\n";
  36. }
  37. ?>