aboutsummaryrefslogtreecommitdiff
path: root/reboot.php
blob: a6c1981c71f3aff1fb97af4a3f4a639be7111b69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* Reboots the router
*
* PHP version 5
*
* @category Tools
* @package  linksys-wrt3g-tools
* @author   Christian Weiske <cweiske@cweiske.de>
* @license  AGPL v3
* @link     http://cweiske.de/linksys-wrt3g-tools.htm
*/
require_once dirname(__FILE__) . '/config.php';
require_once dirname(__FILE__) . '/functions.php';

try {
    $w = new Wrt3g();
    $resp = $w->reboot();
    echo $resp->getStatus() . ' ' . $resp->getReasonPhrase() . "\n";
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage() . "\n";
}
?>