home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
General Forums
OffTopic
php/SQL-Help for Geofence-Project?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="The_Stig" data-source="post: 1139149" data-attributes="member: 12276"><p>Done.</p><p></p><p>What will be the content of the something.php? Do I have to connect to the database first?</p><p></p><p>Understood.</p><p></p><p>How? ;-)</p><p></p><p></p><p>I currently only have the scripts to activate and deactivate. This is my activate.php (the deactivate.php is nearly identical):</p><p>[CODE]</p><p><?php</p><p>$httpformat="http"; //hier angeben ob http oder https</p><p>$port="5000"; //port</p><p>$loginname="administrator"; //Loginname an der Surveillance Station</p><p>$passwd="Passwort"; //passwort an der Surveillance Station</p><p>$ip="192.168.178.99"; //ip adresse der Surveillance station im LAN</p><p>$cam_id="1"; // Kamera ID mit script "hole Kamera ID" abfragen, später automatisieren</p><p></p><p>//Login an der Surveillance Station:</p><p></p><p>$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'");</p><p>$obj = json_decode($json, true);</p><p>$sid = $obj["data"]["sid"];</p><p></p><p>//Kamera aktivieren:</p><p>$json = file_get_contents($httpformat."://".$ip.":".$port."/webapi/_______________________________________________________entry.cgi?api=SYNO.SurveillanceStation.Camera&method=Enable&version=3&cameraIds=".$cam_id."&_sid=".$sid);</p><p></p><p></p><p>//Logout Surveillance Station:</p><p>$out = file_get_contents($httpformat."://".$ip.":".$port."/webapi/auth.cgi?api=SYNO.API.Auth&version=3&method=Logout &session=SurveillanceStation");</p><p>?></p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="The_Stig, post: 1139149, member: 12276"] 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] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
General Forums
OffTopic
php/SQL-Help for Geofence-Project?
Contact us
RSS
Top
Bottom