summaryrefslogtreecommitdiff
path: root/isup/ping.php
diff options
context:
space:
mode:
authorroot2014-12-04 17:10:49 +0100
committerroot2014-12-04 17:10:49 +0100
commitbf3847219714d71e59bfa04569089ab52f852960 (patch)
tree1eaa8255ea1a522c16f7267cf3639bb1681279c9 /isup/ping.php
parentbbe481a7fa159db107c7005f8b024bf4657c0bd6 (diff)
downloadtools.iamfabulous.de-bf3847219714d71e59bfa04569089ab52f852960.tar.gz
Finished tool for checking downtime
Diffstat (limited to 'isup/ping.php')
-rw-r--r--isup/ping.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/isup/ping.php b/isup/ping.php
deleted file mode 100644
index 4c1bea7..0000000
--- a/isup/ping.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-function ping($host, $ipv6){
-
- if ( $ipv6 )
- $ping = "/usr/bin/fping6";
- else
- $ping = "/usr/bin/fping";
-
- system($ping . " " . $host . " > /dev/null 2>&1", $ret);
-
- if ( $ret != 0 )
- return false;
-
- return true;
-}
-
-function sanitizeHost($host){
-
- if ( preg_match("|^[a-zA-Z]+://|", $host, $match) )
- $host = str_replace($match[0], "", $host);
- if ( preg_match("|(?<query>/.*)|", $host, $match) )
- $host = str_replace($match["query"], "", $host);
-
- return escapeshellarg($host);
-}