Very Simple PHP Question

Posted on 2004-08-06
Last Modified: 2006-11-17
When I go to it displays my IP: . It also displays this: . IPCHICKEN refers to that as the "name address." I've seen many sites do the same thing and display the "name adress."

MY QUESTION IS: How do u display the "name address" in PHP.

BTW, I already know how to display the IP: $_SERVER["REMOTE_ADDR"]. Could u tell me how to display the name adress in this format, if it is possible.
Question by:andrey_2007
1 Comment

Accepted Solution

Tomex earned 200 total points
ID: 11739475
You need to feed the gethostbyaddr() function the IP address eg:

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question