Try using this:
$_SERVER['SERVER_NAME']
Or parse:
$_SERVER['REQUEST_URI']
Reference: apache_request_headers()
More Related Contents:
- Turn Plain Text URLs into Active Links using PHP [closed]
- How to create friendly URL in php?
- GET URL parameter in PHP
- How can I create friendly URLs with .htaccess?
- PHP ini file_get_contents external url
- Remove all special characters from a string [duplicate]
- Get URL query string parameters
- How to get protected property of object in PHP
- How to get multiple parameters with same name from a URL in PHP
- How to replace text URLs and exclude URLs in HTML tags?
- Sanitizing strings to make them URL and filename safe?
- How do I linkify urls in a string with php?
- Get title of website via link
- PHP Get Site URL Protocol – http vs https
- best way to determine if a URL is an image in PHP
- Beautiful way to remove GET-variables with PHP?
- What can use for DateTime::diff() for PHP 5.2?
- Using PHP Replace SPACES in URLS with %20
- nginx redirect loop, remove index.php from url
- encodeURI() in PHP?
- Proper URL forming with a query string and an anchor hashtag
- Manipulate a url string by adding GET parameters
- PHP Application URL Routing
- Check if URL has certain string with PHP
- Get domain name from full URL
- %2F in URL breaks and does not reference to the .php file required [duplicate]
- Parsing URL query in PHP [duplicate]
- WAMP – Remove localhost from project URL
- How to properly create HTML links in PHP?
- How do I apply URL normalization rules in PHP?