如何获取访问者的IP地址? [英] How to get visitors IP Address?

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

问题描述

我正在使用Virtual.php,我必须编写一个与此类似的程序,向服务器报告用户的IP地址。这和我到目前为止一样多。


import java.lang

import java.net

import javax.net

导入javax.net.ssl

导入javax.security.auth.kerberos

import org.ietf.jgss


公共类InetAddress extends Object实现Serializable


帮助我遇到障碍。

I am using Virtual.php and I have to write a program similar to this that reports the IP address of the user to the server. This is as much as I have so far.

import java.lang
import java.net
import javax.net
import javax.net.ssl
import javax.security.auth.kerberos
import org.ietf.jgss

public class InetAddress extends Object implements Serializable

Help I''m at a roadblock.

推荐答案

你好。欢迎来到The Scripts!


我将把你的帖子分成Java论坛中自己的帖子,Java专家更有可能找到它。

主持人
Hi. Welcome to The Scripts!

I am going to split your post into it''s own thread in the Java forum, where the Java Experts are more likely to find it.

Moderator



我正在使用Virtual.php,我必须写一个类似的程序为此向服务器报告用户的IP地址。这和我到目前为止一样多。


import java.lang

import java.net

import javax.net

导入javax.net.ssl

导入javax.security.auth.kerberos

import org.ietf.jgss


公共类InetAddress extends Object实现Serializable


帮助我遇到障碍。
I am using Virtual.php and I have to write a program similar to this that reports the IP address of the user to the server. This is as much as I have so far.

import java.lang
import java.net
import javax.net
import javax.net.ssl
import javax.security.auth.kerberos
import org.ietf.jgss

public class InetAddress extends Object implements Serializable

Help I''m at a roadblock.



你没有多少钱。当你做了一些真正的工作时,谷歌会更多并再次发布。

You don''t have much at all. Google some more and post again when you''ve done a bit of real work on it.


当ServerSocket接受来自客户端的连接请求时,接受

方法返回一个连接的Socket。阅读API文档,了解这些内容可以告诉您有关其连接对等方的信息。


亲切的问候,


Jos
When a ServerSocket accepts a connection request from a client the accept
method returns a connected Socket. Read the API documentation for what such
a Socket can tell you about its connected peer.

kind regards,

Jos


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

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