Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get hostname

<?php
echo gethostname(); // may output e.g,: sandie

// Or, an option that also works before PHP 5.3
echo php_uname('n'); // may output e.g,: sandie
?>
 
PREVIOUS NEXT
Tagged: #php #hostname
ADD COMMENT
Topic
Name
7+1 =