Solved

Very Simple PHP Question

Posted on 2004-08-06
1
438 Views
Last Modified: 2006-11-17
When I go to IPCHICKEN.com it displays my IP: 69.3.28.xxx . It also displays this: h-69-3-28-xxx.snvacaid.dynamic.covad.net . 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.
0
Comment
Question by:andrey_2007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

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

<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
 
echo $hostname;
?>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Introduction to Processes

695 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