thx for the first help!
i have edited the code so:
function checkurl($url, $hyperlink="") {
$righturl = $url;
if(!preg_match("![a-z]://!si", $url)) {
$righturl = "http://freemail.web.de/jump.htm?url=http://$righturl";
}
// remove threat of users including javascript in url
/*$righturl = preg_replace("/javascript
:/si", "java script:", $righturl);
$righturl = preg_replace("/about
:/si", "about :", $righturl);*/
$hyperlink = iif(trim($hyperlink)=="" or $hyperlink==$url, iif(strlen($url)>55,substr($url,0,35)."...".substr ($url,-15),$url) ,$hyperlink);
return "<a href=\"$righturl\" target=\"_blank\">".str_replace('\"', '"', $hyperlink)."</a>";
}
Now every link with
www.xxx.com will be linked so:
http://freemail.web.de/jump.htm?url=http://www.xxx.com
But when somebody write the link
http://www.xxx.com, the redirect link, which I wish, isn't add!
where must I change the code? I hope for fast help!
greetz stamper