获取客户端的IP地址 [英] for get ip address of client

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

问题描述

你好先生

i我开始研究asp.net web应用程序。现在我需要一些帮助,我想存储他们在我的网站登录的客户端系统的IP地址。为此我在谷歌上搜索代码但找不到。

请帮助我

hello sir
i am start working on asp.net web application .now i need some help that ,i want to store ip address of client system where they log in in my web site .for this i am searching code on google but not found.
please help me

推荐答案

你好朋友,



我不是ASP.Net的人,但我可以给你一些指导,以便继续前进并解决这个问题。



这是个主意。



1.在解决方案中使用idle63提供的链接获取用户的IP地址。



2.有一些完整的SQL文件可用,其中包含表中所有IP地址和Place关系的列表。您必须下载一个并创建一个数据库并将该表存储在您的数据库中。



3.现在您需要创建一个简单的SELECT查询来获取用户根据他的IP地址。



4.然后使用您的服务器时间,您可以获得该用户的登录时间。



5.只需将所有这些数据存储在您的数据库中。



6.您也可以创建一个简单的视图来显示这些结果喜欢fb,当用户想要查看他最近的活动时:)



希望这个答案会给你一些前进的想法。请给我的答案评分:)



有问候

Tushar Srivastava
Hi friend,

I am not a ASP.Net guy but I can give you some pointers to move ahead and solve this problem.

Here's the idea.

1. Use the link provided by idle63 in his solution to get user's ip address.

2. There are some complete SQL files available which contains a list of all the IP address and Place relation in a table. You have to download one and create a database and store that table in your database.

3. Now you need to create a simple SELECT query to get the Place of the user based on his IP-Address.

4. Then using your server time, you can get the time of login of that user.

5. Simply store all this data in your database.

6. You can create a simple view also to display these results just like fb when a user wants to look at his recent activities :)

Hope that this answer will give you some ideas to move ahead. Please do rate my answer :)

With Regards
Tushar Srivastava


有几个结果,如果你谷歌asp.net获取客户端IP



其中一个

http://www.aspsnippets.com/Articles/How-to-get- IP-Address-of-Visitors-Machine-in-ASP.Net.aspx [ ^ ]
There are thousends of results if you google for "asp.net getting client ip"

One of them
http://www.aspsnippets.com/Articles/How-to-get-IP-Address-of-Visitors-Machine-in-ASP.Net.aspx[^]


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

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