Subversion Repositories alarming

Rev

Blame | Last modification | View Log | RSS feed

#!/usr/bin/php
<?php

# --- PLEASE MODIFY:

# To which daemon server should the alarm be sent?
$url     = "http://127.0.0.1:8085";

# --- DON'T MODIFY AFTER THIS LINE

$fields = array();
$fields[] = "action=motion_off"; // 1.3.6.1.4.1.37476.2.4.1.101

$fields_string = implode('&', $fields);

echo urldecode($fields_string)."\n";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$result = curl_exec($ch);

echo $result;