Login | ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/alarming/trunk/Server/manual_alarm_off
Revision: 8
Committed: Sun Jul 7 22:02:12 2019 UTC (13 months ago) by daniel-marschall
File size: 569 byte(s)

File Contents

# Content
1 #!/usr/bin/php
2 <?php
3
4 # --- PLEASE MODIFY:
5
6 # To which daemon server should the alarm be sent?
7 $url = "http://127.0.0.1:8085";
8
9 # --- DON'T MODIFY AFTER THIS LINE
10
11 $fields = array();
12 $fields[] = "action=motion_off"; // 1.3.6.1.4.1.37476.2.4.1.101
13
14 $fields_string = implode('&', $fields);
15
16 echo urldecode($fields_string)."\n";
17
18 $ch = curl_init();
19 curl_setopt($ch, CURLOPT_URL, $url);
20 curl_setopt($ch, CURLOPT_POST, true);
21 curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
22 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
23
24 $result = curl_exec($ch);
25
26 echo $result;

Properties

Name Value
svn:executable *