$url_input = (!$urlprefix == "" ? $urlprefix : "").$data['user_web']; $url_input = trim($url_input, '/'); if (!preg_match('#^http(s)?://#', $url_input)) { $url_input = 'http://'.$url_input; } $parts = parse_url($url_input); $web = preg_replace('/^news.php\./', '', $parts['host']); $url_chk = fsockopen($web, 80, $errno, $errstr, 30); if (!$url_chk) { echo "