I need to modify my function to return also the current folder I am in. Here is my current function:
function getLinkFromHost($url){  
    $port = $_SERVER['REMOTE_PORT'];  
    $server = $_SERVER['HTTP_HOST'];  
    if($port == 443){  
        $type = "https";  
    } else {  
        $type = "http";  
    }  
    return $type . "://" . $server . "/" . $url;  
}
                Take a look at $_SERVER['REQUEST_URI'] or $_SERVER['SCRIPT_NAME']
(From the $_SERVER manual entry)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With