473,408 Members | 2,839 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 the OS type from the IPAddress ?

296 100+
How to get the OS type from the IPAddress or Hostname ?
Apr 6 '10 #1
2 2602
RonB
589 Expert Mod 512MB
How to get the OS type from the IPAddress or Hostname ?
You can't.

If you want the OS of the system where the script is running, that's stored in the $^O var.

Example:
C:\>perl -e "print $^O"
MSWin32
Apr 6 '10 #2
numberwhun
3,509 Expert Mod 2GB
IP Address and Hostname are OS independent. There is no way to really tell what OS they are linked/assigned to. To tell that, you would either have to be at the machine the IP is assigned to or, when it connects to your website, have a look at the HTTP headers as it is stored in there.

Regards,

Jeff
Apr 6 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String...
5
by: jorfei | last post by:
I have written a component with a property IPAdrress of type System.Net.IPAddress. To ease the configuration of the component at design time, I have written a type converter for the type...
6
by: ed | last post by:
What is the difference between IPAddress::Any and IPAddress::Broadcast when being using by a TCPListener class?
3
by: dolphin | last post by:
Hi, I have the name of a local variable in a method. How can I retrieve the type of it? For example, in the following code fragment: ************************************************* CString...
2
by: MG | last post by:
Hello, I try to create IPAddress object from array of bytes and it always throws exception, even when array of bytes is taken from proper IPAddress object: IPAddress...
5
by: Stuart Norris | last post by:
Dear Readers, I am attempting to define an array of IPAddress-es in C#. I wish to have a array of address so I can try in order to connect to them in a loop to handle unavailable hosts. ...
2
by: David Dvali | last post by:
How can I use System.Net.IPAddress class? I want assign some IP for example: 85.125.20.60
2
by: Ryan Liu | last post by:
Hi, Can someone tell me how to calculate an IPaddress's long value? I have an application which lisiten on a port using UDP protocol. There could be multiple client sendind UDP data to it and...
3
by: KBJ | last post by:
Hi, How can I get IP address of client, which sends request to server via .net remoting? Regards, Kate
20
by: =?Utf-8?B?ZW1pdG9qbGV5ZXM=?= | last post by:
Hi everyone: i read from the documentation of a dll that there is a struct that uses char for storing an IP address. How can it be? and how come i can get to representate the same value in a...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.