473,408 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to get host name from ip address?

Hello everyone,
Please tell me some methods to get host name from ip address, thank you.

Dec 19 '06 #1
1 35805
that is an easy one,

System.Net.IPHostEntry ip =
System.Net.Dns.GetHostByAddress("192.168.1.1");
string hostname = ip.HostName;
Hooyoo schreef:
Hello everyone,
Please tell me some methods to get host name from ip address, thank you.
Dec 19 '06 #2

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

Similar topics

9
by: Jeff | last post by:
Is there a way to echo back a case sensitive $HTTP_HOST in PHP? For example if I type HostName.domain.com in my browser I want to return it exactly as it appears in the location part of the browser...
1
by: techprot-google04 | last post by:
I've found tons of sample code on pinging - but all start with the host name, resolve the ip address and do the ping. Does anyone have any sample code that does a ping from an ip address alone?...
6
by: Brian Henry | last post by:
is there a way to get the host name of someone? like mine is 68-23-123-123-pitt-pa.adelphia.net? Request.UserHostName doesn't seem to return the host name like it states in the documentation,...
2
by: brett | last post by:
I can get the IP address of a visitor on my site by $_SERVER; how do I get the corresponding URL. If the user is on Comcast, the URL (host name) may look like: ...
2
by: martin lanny | last post by:
Simple network scanner is a part of my dotnet solution. It pings ip addresses in a selected network range and gives me the response time for each computer it finds. Anyhow, I would need to...
1
by: vijayB | last post by:
Hi All, I have written an application in which I m accessing remote host name using; System.net.dns.GetHostByAddress(<IP Address>).HostName It is working fine with Windows Vista and Windows...
2
Xx r3negade
by: Xx r3negade | last post by:
I'm making a C++ wrapper for the standard C BSD sockets. In my object's "connect" function, I have a "host string" that can be either a host name or an ip address. Is there any C function, or any...
1
by: sidd4one | last post by:
hi, hi i just want known how to get ip address by giving host name of a particular system in the network...
1
by: ukbasak | last post by:
Hi, I tried to print user name who ever accesss application. I added the code request.getHostName() and request.getRemoteAddr(). The get.getRemoteAddr() is showing IP address but the code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...

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.