Set up server: http://www.cyberciti.biz/faq/rhel-fedora-linux-apache-enable-webdav/
<?php
###########################################################################################
# Enter your authentication details below: Save as yourname.php once you have filled the information in and
#placed it on your hosting server
# go to http://server/yourname.php and your Web Dav will be registered!!
###########################################################################################
require_once("lccs.php");
###########################################################################################
# Enter your authentication details below:
###########################################################################################
$account = "ICSaccount";
$room = "$room";
$devuser = "Developer_email";
$devpass = "Developer_password";
$secret = "Secret";
$host = "https://cloud.ics.influxis.com";//Based on server location selected
$archive = "$archiveID"
$accountURL = "{$host}/{$account}";
###########################################################################################
# Create a session
###########################################################################################
session_start();
###########################################################################################
# Register Hook (Admin Code)
###########################################################################################
if(isSet($_session['RTCAccount'])) {
//login to lccs only require once
$lccs = unserialize($_SESSION['RTCAccount']);
$lccs->keepalive();
}
else {
// Login once, do the handshake once for your account and then call multiple API
$lccs = new RTCAccount($accountURL);
$lccs->login($devusername, $devpassword);
$_SESSION['RTCAccount'] = serialize($lccs);
}
$lccs->unregisterRepository(); //this will remove any existing wev dav server
$lccs->registerRepository("http://USER:PASSWORD@WEBDAV_IP_OR_DNS_NAME:80/webdav/"); //your web dav location
$lccs->registerHook();
$lccs->unsubscribeCollection();
$lccs->subscribeCollection();
?>
Comments