X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=php%2Fplc_api.php;fp=php%2Fheader.php;h=cb7257ad9c67826164d1c3ec26cc9b5e61ebdacf;hb=598e1e840b55262fd40c6d1700148e4f0b508065;hp=54f9b1e78f3ffebfb28ba4b53a8b3b6423068bec;hpb=fabf020a2ee703a4adf22c213759840f2a55261a;p=plcapi.git diff --git a/php/header.php b/php/plc_api.php similarity index 95% rename from php/header.php rename to php/plc_api.php index 54f9b1e..cb7257a 100644 --- a/php/header.php +++ b/php/plc_api.php @@ -201,3 +201,17 @@ class PLCAPI // PLCAPI Methods // + function __call($name, $args) + { + array_unshift($args, $this->auth); + return $this->call($name, $args); + } +} + +global $adm; + +$adm = new PLCAPI(array('AuthMethod' => "capability", + 'Username' => PLC_API_MAINTENANCE_USER, + 'AuthString' => PLC_API_MAINTENANCE_PASSWORD)); + +?>