我怎么知道IP地址和NIC卡号 [英] How can I know IP address and NIC card No.

查看:103
本文介绍了我怎么知道IP地址和NIC卡号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在托管一个网站,我需要知道我网站用户的IP地址.我该如何用PHP语言做到这一点.

用户的IP地址也会动态更改,因此我们是否可以知道其NIC号或可以唯一标识它们的类似名称?

I am hosting a website and i require to know IP address of users of my website. How can i do that in PHP language.

Also IP address of users changes dynamically , so can we know their NIC No. or something similar to it which can identify them uniquely?

推荐答案

IP地址:
(来自 http://admincmd.blogspot.com/2007/08/php- get-client-ip-address.html [ ^ ])

IP Address:
(from http://admincmd.blogspot.com/2007/08/php-get-client-ip-address.html[^])

function getIP() { 
    


ip ; 如果(getenv(" ) )
ip; if (getenv("HTTP_CLIENT_IP"))


ip = getenv(" ); 否则 if(getenv(" ))
ip = getenv("HTTP_CLIENT_IP"); else if(getenv("HTTP_X_FORWARDED_FOR"))


这篇关于我怎么知道IP地址和NIC卡号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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