PHP MyZeo Web API Library

English

Dear All,

Have produced a simple php library which can be used to access the MyZeo database.  The library supports sessionids, so you should be able to create a server which the user logs into.

Example

include "zeolib.php" ;

$apidomain="http://www.apidomain.com/" ;
$apikey="1234567890ABCDEF" ;

$username="user@domain.com" ;
$password="myzeologinpassword" ;

$zeo = new MyZeo() ;
$zeo->setlogincredentials($apidomain, $apikey, $username, $password) ;
$xml=$zeo->getLatestSleepRecord() ;
$stat=$zeo->getLastStatus() ;
if ($stat=="OK") { .... }
$sessionid=$zeo->getsessionid() ;
// store session ID in cookie

// get session ID from cookie ...
$zeo2->setsessionid($apidomain, $apikey, $sessionid) ;
$xml=$zeo2->getLatestSleepStats() ;
$stat=$zeo2->getLastStatus() ;
if ($stat=="OK") { .... }

Steve

Forums:

Image uploads to Html: