Fetching an URL : 07 June 2011 • Tapovan Just make a variable as given below and that's it. $our_url ='http'.((!empty($_SERVER['HTTPS']))?'s':'').'://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']; Last updated: June 07, 2011