473,626 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gethostbyaddr returns IP

What reasons are there for the following returning the IP address
instead of the hostname?

gethostbyaddr($ _SERVER['REMOTE_ADDR'])

Jul 17 '05 #1
1 3261
On Sun, 05 Dec 2004 15:22:41 -0600, "O.B." <fu******@bells outh.net>
wrote:
What reasons are there for the following returning the IP address
instead of the hostname?

gethostbyaddr( $_SERVER['REMOTE_ADDR'])


The most common reason is that there's no reverse DNS entry for the
IP. The second most commone would be a misconfiguratio n on your end
disallowing lookups.
--
gburnore@databa six dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
=============== =============== =============== =============== ===============
Want one? GET one! http://signup.databasix.com
=============== =============== =============== =============== ===============
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1625
by: Sibylle Koczian | last post by:
Hello all, the documentation for the socket module says that gethostbyaddr should return the primary host name and alternative host names if there are any. But the alias list is empty even in cases where I know aliases exist. I can get them using gethostbyname_ex, but that only works with names, not with IP addresses, and I want to resolve both sorts. I'm using Python 2.3.2 on Windows NT4, SP6.
2
2693
by: Neil Aggarwal | last post by:
Hello: I am using gcc on RedHat Linux 9. When I try to do a reverse dns query using gethostbyaddr, it works fine for hosts that have a PTR record, but it returns null for hosts that have a CNAME record. Any ideas how to work around this? Here is an example: dig -x 66.54.79.4
1
4987
by: kcw3388 | last post by:
Hi, I have a SunOS TCP/IP client program worked fine for a long time until yesterday. Now, my TCP/IP server program is located on different DNS server. The gethostbyaddr ( ) is now returned NULL instead.
2
3192
by: Harlin Seritt | last post by:
I have a list of IP addresses I am testing with socket.gethostbyaddr(). For the most part, I am able to get a hostname returned to me when I run gethostbyaddr(). I am also hoping this will allow me to tell if a computer is up or down. However, in my environment, I am finding that I am able to get a hostname even though I am unable to actually ping that server (when I ping a server i like this, I get 'request timed out' messages telling me...
0
1417
by: Jørn Dahl-Stamnes | last post by:
I have a PHP script which contain the following code: $hostname = gethostbyaddr ($ip); Until yesterday, the gethostbyaddr returned the hostname of the given IP-addresse. But yesterday it began to return the name of the host the web-server is running on regardless of the given IP. If I do a 'host <IP>' from a shell on the same machine, I get the correct hostname. I have tried to restart the web-server (Apache 2.0) without luck.
2
3093
by: christian9997 | last post by:
Hi Since yesterday about 11.00 CET the gethostbyaddr function doesn't seem to be working. All I get is the IP address back. Is this something general to all PHP users or is this specific to my server? Thanks BTW what's the difference between comp.lang.php, alt.php and alt.comp.lang.php, shouldn't these groups be merged?
1
3633
by: shailesh | last post by:
Hi, I am facing a peculiar problem. socket.gethostbyaddr is not working fine on my MAC for ip addresses on the LAN. The LAN happens to consist of linux and windows machines and this is the only one MAC on the LAN. Please see the example below. I am getting error: socket.herror: (1, 'Unknown host')
1
3124
by: lakshmiraja | last post by:
hi, I came to know that gethostbyaddr is deprecated in Visual Studio 2005 by the introduction of getnameinfo function. Can i know the reason for the deprecation of gethostbyaddr function. Is there any security issues related with this function? Also came to know that calling this function is not thread safe. I am not able to get the exact reason for not using gethostbyaddr function.
24
2487
by: RJ_32 | last post by:
When there is no rDNS record on an IP address, then it might take a while for the reverse lookup to timeout. I'm thinking of how on a tracert you can observe the delay. If so, then calling gethostbyaddr() can delay the serving of the web page, right? Because gethostbyaddr() is not forked into a separate process. So I suppose I'd need to call gethostbyaddr() as the very last task for a script. Does that sound right? Or is there another...
0
8205
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8713
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8644
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6126
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4208
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2632
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1516
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.