Si je te montre cette portion de code, pourrais-tu me dire à quoi sert selfURL ?
function selfURL() {
$s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on" ) ? "s" : "";
$protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/" ).$s;
$port = ($_SERVER["SERVER_PORT"] == "80" ) ? "" : (":".$_SERVER["SERVER_PORT"]);
return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI'];
}
C'est une portion de code du bot de flickr.