Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 IP 地址获取客户端机器名称。
如果我从以下位置获取客户端的 IP 地址 -
ip_addr = request.env['REMOTE_ADDR']
`nbtstat –a #{request.env['REMOTE_ADDR']}`
Ruby 反引号在命令提示符处运行生成的字符串。
但这可能会让您知道他们的子网路由器的名称,而不是文字机器的名称。再说一次,我对互联网路由协议等几乎一无所知。