I want to get a URL and its parameters. Example:
www.someweb.com/somepage.php?id=10
How to get only
for complette URL with protocol, servername and parameters:
$base_url = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ? 'https' : 'http' ) . '://' . $_SERVER['HTTP_HOST']; $url = $base_url . $_SERVER["REQUEST_URI"];