obtenir l'url complète php
$fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
url actuelle php
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
php obtient le nom du chemin d'url
parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );