/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("|(?/.*)|", $host, $match) ) $host = str_replace($match["query"], "", $host); return escapeshellarg($host); }