Normal
Done.What will be the content of the something.php? Do I have to connect to the database first?Understood.How? ;-)I currently only have the scripts to activate and deactivate. This is my activate.php (the deactivate.php is nearly identical):[CODE]<?php$httpformat="http"; //hier angeben ob http oder https$port="5000"; //port$loginname="administrator"; //Loginname an der Surveillance Station$passwd="Passwort"; //passwort an der Surveillance Station$ip="192.168.178.99"; //ip adresse der Surveillance station im LAN$cam_id="1"; // Kamera ID mit script "hole Kamera ID" abfragen, später automatisieren//Login an der Surveillance Station:$json = file_get_contents($httpformat."://".$ip.":".$port."/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=3& account=".$loginname."&passwd=".$passwd."&session= SurveillanceStation&format=sid'");$obj = json_decode($json, true);$sid = $obj["data"]["sid"];//Kamera aktivieren:$json = file_get_contents($httpformat."://".$ip.":".$port."/webapi/_______________________________________________________entry.cgi?api=SYNO.SurveillanceStation.Camera&method=Enable&version=3&cameraIds=".$cam_id."&_sid=".$sid);//Logout Surveillance Station:$out = file_get_contents($httpformat."://".$ip.":".$port."/webapi/auth.cgi?api=SYNO.API.Auth&version=3&method=Logout &session=SurveillanceStation");?>[/CODE]
Done.
What will be the content of the something.php? Do I have to connect to the database first?
Understood.
How? ;-)
I currently only have the scripts to activate and deactivate. This is my activate.php (the deactivate.php is nearly identical):
[CODE]
<?php
$httpformat="http"; //hier angeben ob http oder https
$port="5000"; //port
$loginname="administrator"; //Loginname an der Surveillance Station
$passwd="Passwort"; //passwort an der Surveillance Station
$ip="192.168.178.99"; //ip adresse der Surveillance station im LAN
$cam_id="1"; // Kamera ID mit script "hole Kamera ID" abfragen, später automatisieren
//Login an der Surveillance Station:
$json = file_get_contents($httpformat."://".$ip.":".$port."/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=3& account=".$loginname."&passwd=".$passwd."&session= SurveillanceStation&format=sid'");
$obj = json_decode($json, true);
$sid = $obj["data"]["sid"];
//Kamera aktivieren:
$json = file_get_contents($httpformat."://".$ip.":".$port."/webapi/_______________________________________________________entry.cgi?api=SYNO.SurveillanceStation.Camera&method=Enable&version=3&cameraIds=".$cam_id."&_sid=".$sid);
//Logout Surveillance Station:
$out = file_get_contents($httpformat."://".$ip.":".$port."/webapi/auth.cgi?api=SYNO.API.Auth&version=3&method=Logout &session=SurveillanceStation");
?>
[/CODE]