telldus/examples/php/live/authentication/common.php
2012-02-02 15:58:55 +01:00

19 lines
588 B
PHP

<?php
session_start();
require_once 'HTTP/OAuth/Consumer.php';
define('PUBLIC_KEY', '');
define('PRIVATE_KEY', '');
define('URL', 'http://api.telldus.com'); //https should be used in production!
define('REQUEST_TOKEN', constant('URL').'/oauth/requestToken');
define('AUTHORIZE_TOKEN', constant('URL').'/oauth/authorize');
define('ACCESS_TOKEN', constant('URL').'/oauth/accessToken');
define('REQUEST_URI', constant('URL').'/xml');
define('BASE_URL', 'http://'.$_SERVER["SERVER_NAME"].dirname($_SERVER['REQUEST_URI']));
define('TELLSTICK_TURNON', 1);
define('TELLSTICK_TURNOFF', 2);