function urlduzelt($www) { if(preg_match("#^http(s)?://#i",$www)) { return $www; } else { $www = parse_url($www); return $www = "http://".$www['host']; } }