if ( isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on' ) { $protocol = 'https://'; } else { $protocol = 'http://'; } $url = $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if ( isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on' ) { $protocol = 'https://'; } else { $protocol = 'http://'; } $url = $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];