+ 1

Hostname

How do I get visitors hostname with php. This is not working $hostname=gethostname(); echo $hostname; Thanks

7th Apr 2019, 8:56 AM
James Brown
James Brown  - avatar
1 Answer
0
Hi, the gethostname function should return the server's information. If you need the visitor's information, try: https://www.codexworld.com/how-to/get-user-ip-address-php/
7th Apr 2019, 8:04 PM
jerome