What about gethostname()?
Edit: This might not be an option I suppose, depending on your environment. It’s new in PHP 5.3. php_uname(‘n’) might work as an alternative.
Related Contents:
- How to define an empty object in PHP
- Can’t use method return value in write context
- Using str_replace so that it only acts on the first match?
- php var_dump() vs print_r()
- Compare given date with today
- Laravel: Get base URL
- Get random item from array [duplicate]
- Do AJAX requests retain PHP Session info?
- Getting raw SQL query string from PDO prepared statements
- How do I install Composer PHP packages without Composer?
- PHP MySQL Google Chart JSON – Complete Example [closed]
- How to sum all column values in multi-dimensional array?
- Why, Fatal error: Class ‘PHPUnit_Framework_TestCase’ not found in …?
- Naming cookies – best practices [closed]
- PHP Sort Array By SubArray Value
- How do I create a PDO parameterized query with a LIKE statement?
- mcrypt is deprecated, what is the alternative?
- How to convert an array into an object using stdClass() [duplicate]
- How to encrypt/decrypt data in php?
- Can I mix MySQL APIs in PHP?
- List all the files and folders in a Directory with PHP recursive function
- Is there a pretty print for PHP?
- “Class XXX is not a valid entity or mapped super class” after moving the class in the filesystem
- Insert current date in datetime format mySQL
- Get custom product attributes in Woocommerce
- How to set upload_max_filesize in .htaccess?
- Remove all html tags from php string
- Htaccess: add/remove trailing slash from URL
- How can I find the first and last date in a month using PHP?
- Passing data to buildForm() in Symfony 2.8, 3.0 and above
- Edit PDF en PHP? [closed]
- How to create and use nonces
- Laravel OrderBy relationship count
- When setting environment variables in Apache RewriteRule directives, what causes the variable name to be prefixed with “REDIRECT_”?
- php variable in html no other way than:
- WAMP/MySQL errors not in correct language
- PHP DateTime microseconds always returns 0
- Installing PHP Zip Extension in CentOS
- PHP CSV string to array
- SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- Possible Values For: PHP_OS
- PHP: Is mysql_real_escape_string sufficient for cleaning user input?
- How safe are PHP session variables?
- New CSRF token per request or NOT?
- Can curl make a connection to any TCP ports, not just HTTP/HTTPS?
- LOAD DATA LOCAL INFILE forbidden in… PHP
- Incorrect Integer (2147483647) is inserted into MySQL?
- CURL and HTTPS, “Cannot resolve host”
- Running AMP (apache mysql php) on Android [closed]
- PHP Date Function Seven days previous