如何从IP地址获取计算机名称? [英] How to get the computer name from ip Address?

查看:550
本文介绍了如何从IP地址获取计算机名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用php从IP地址获取计算机名称。

How to get the computer name from IP Address using php.

概念:

如何使用系统信息来限制用户。我不希望IP地址有这个限制。,因为它不适合我。,IP地址每天都不是静态的,它会改变所以我想要一个系统名称或系统相关的东西。我的基本想法是我想限制用户只能访问一个系统,而不是其他一些系统,(1个用户 - 1个系统)和他/她的登录详细信息。 ..这就是我的项目的概念......

How to restrict the user with using the system information.,i don't want the IP Address with that restriction.,because it doesn't use for me.,the IP Address are not static everyday it'll changed so i want a system name or something system related.,my basic idea is i want to restrict the user with the access of only one system.,not some other.,(1 user - 1 system) with his/her login details...so this is the concept for my project...

推荐答案

gethostbyaddr($TheIpAddress);

可以解决问题。 http://php.net/gethostbyaddr

这篇关于如何从IP地址获取计算机名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆