Hello,
I'm trying to grab the domain from a 301 redirect with masking.
I can grab the domain name in Chrome with:
<?php echo parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); ?>
This doesn't work in other browser because: from the php manual, "This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature.
Anyone have experience reliably getting the 'domain.com' from the referrer when dealing with 301 redirect (with masking) in all browsers? (if it must be done with regex can you please be detailed) Thanks