Get url PHP?

This script will echo the full url.

preg_match-instead-of-eregi-php

$url = $_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’];

Something like this: http://yourwebsite.com/index.php?route=product/search&tag=black%20asymmetric%20coat

There are many scripts on the web that are returning just the initial url, “http://yourwebsite.com”.

So use this one instead.

ADD A COMMENT: