class Wrt3g
{
+ /**
+ * Router hostname/IP
+ *
+ * @var string
+ */
+ public $host;
+
+ /**
+ * Name of user with administration privileges
+ *
+ * @var string
+ */
+ public $user;
+
+ /**
+ * Password for $user
+ *
+ * @var string
+ */
+ public $password;
+
protected static $arTranslations = array(
'GPRS_MSG.WWBEAR' => 'type',
'GPRS_MSG.NNAME' => 'network',
$r->setMethod(HTTP_Request2::METHOD_POST);
$r->setUrl(
'http://'
- . $GLOBALS['linksys-wrt3g-tools']['user']
- . ':' . $GLOBALS['linksys-wrt3g-tools']['password']
- . '@' . $GLOBALS['linksys-wrt3g-tools']['ip']
+ . $this->user
+ . ':' . $this->password
+ . '@' . $this->host
. '/apply.cgi'
);
$r->addPostParameter('action', 'Reboot');
$arRetval = array();
$strUrlBase = 'http://'
- . $GLOBALS['linksys-wrt3g-tools']['user']
- . ':' . $GLOBALS['linksys-wrt3g-tools']['password']
- . '@' . $GLOBALS['linksys-wrt3g-tools']['ip'];
+ . $this->user
+ . ':' . $this->password
+ . '@' . $this->host;
/**
* Connection status