get system name in php

You can get the system name (or hostname) in PHP by using the gethostname() function. Here's an example:

main.php
$system_name = gethostname();
echo "System name: " . $system_name;
67 chars
3 lines

This will output something like System name: mycomputer.local or System name: myserver.example.com. Note that the actual format of the hostname depends on your system configuration.

gistlibby LogSnag