Home PHP - MySQL How to get full url link in PHP? How to get full url link in PHP? March 31, 2013 0 $_SERVER['HTTP_HOST'] = This will return server name from the URL.$_SERVER['REQUEST_URI'] = This will return the full path of your directory.The following example will give you clear idea,<?php $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; echo $url; ?> Tags: get url structure in phpPHP - MySQL Newer Older