Puoi usare l'array globale $_SERVER che contiene le informazioni che ti servono:
http://php.net/manual/en/reserved.variables.server.php
Puoi usare l'array globale $_SERVER che contiene le informazioni che ti servono:
http://php.net/manual/en/reserved.variables.server.php
Pensate i programmi a librerie, e innalzate il livello d'astrazione