6 if ($_SERVER["HTTPS"] == "on") {$url .= "s";}
8 if ($_SERVER["SERVER_PORT"] != "80") {
9 $url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"];
11 $url .= $_SERVER["SERVER_NAME"];
16 function add_href($match){
17 return '<a href="'.$match[0].'">'.$match[0].'</a>';
20 function add_links($text, $url) {
21 $preg_url = "/".str_replace("/", "\/", $url)."[^&\"]*"."/";
22 $replacement = preg_replace_callback($preg_url, "add_href", $text);