Hostname | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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