summaryrefslogtreecommitdiff
path: root/down/ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'down/ajax.php')
-rw-r--r--down/ajax.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/down/ajax.php b/down/ajax.php
index 63a63d1..f5a4ce6 100644
--- a/down/ajax.php
+++ b/down/ajax.php
@@ -11,9 +11,9 @@ if( !isset($_REQUEST["url"]) || $_REQUEST["url"] == "" ){
exit;
}
-function ipv6($host){
+function ipv6($ip){
- if ( filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) ) {
+ if ( filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) ) {
return true;
}
@@ -40,7 +40,7 @@ switch($_REQUEST["action"]){
if ( !ipv6($_REQUEST["url"]) && filter_var(sanitizeUrl($_REQUEST["url"]), FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED) === false ){
echo "not valid";
} else {
- if( isUp($_REQUEST["url"]) ){
+ if( isUp($_REQUEST["url"], ipv6($_REQUEST["url"]) ) ){
$r["status"] = "Looks like it's up from here.";
$r["data"] = 1;
} else {