a7be1be5f80f38e3b40628aefd0cf9145f040991
[linksys-wrt3g-tools.git] / reboot.php
1 <?php
2 /**
3 * Reboots the router
4 *
5 * PHP version 5
6 *
7 * @category Tools
8 * @package  linksys-wrt3g-tools
9 * @author   Christian Weiske <cweiske@cweiske.de>
10 * @license  AGPL v3
11 * @link     http://cweiske.de/linksys-wrt3g-tools.htm
12 */
13 require_once dirname(__FILE__) . '/config.php';
14 require_once 'Wrt3g.php';
15
16 try {
17     $w = new Wrt3g();
18     $resp = $w->reboot();
19     echo $resp->getStatus() . ' ' . $resp->getReasonPhrase() . "\n";
20 } catch (Exception $e) {
21     echo 'Error: ' . $e->getMessage() . "\n";
22 }
23 ?>