remote-reboot-restart-server
Gesponsorde koppelingen
PHP script bestanden
windowsxp.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
// check if 'p' has been set
if(isset($_GET['p']))
{
$p = $_GET['p'];
// shutdown
if($p == 'winxpshut')
{
$output = shell_exec('shutdown -s -t 20');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt over 20 seconden afgesloten.</p>";
}
// reboot
elseif($p == 'winxpreboot')
{
$output = shell_exec('shutdown -r -t 20');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt over 20 seconden herstart.</p>";
}
// no valid value
else
echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
echo "Geen waarde ingevuld.";
?>
// check if 'p' has been set
if(isset($_GET['p']))
{
$p = $_GET['p'];
// shutdown
if($p == 'winxpshut')
{
$output = shell_exec('shutdown -s -t 20');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt over 20 seconden afgesloten.</p>";
}
// reboot
elseif($p == 'winxpreboot')
{
$output = shell_exec('shutdown -r -t 20');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt over 20 seconden herstart.</p>";
}
// no valid value
else
echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
echo "Geen waarde ingevuld.";
?>
linux.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
// check if 'p' has been set
if(isset($_GET['p']))
{
$p = $_GET['p'];
// shutdown
if($p == 'linuxshut')
{
$output = shell_exec('shutdown -h now');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt afgesloten.</p>";
}
// reboot
elseif($p == 'linuxreboot')
{
$output = shell_exec('shutdown -r now');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt herstart.</p>";
}
// no valid value
else
echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
echo "Geen waarde ingevuld.";
?>
// check if 'p' has been set
if(isset($_GET['p']))
{
$p = $_GET['p'];
// shutdown
if($p == 'linuxshut')
{
$output = shell_exec('shutdown -h now');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt afgesloten.</p>";
}
// reboot
elseif($p == 'linuxreboot')
{
$output = shell_exec('shutdown -r now');
echo "<p>" . $output . "</p>";
echo "<p>Uw server wordt herstart.</p>";
}
// no valid value
else
echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
echo "Geen waarde ingevuld.";
?>