这将获取您的远程IP地址
import urllibip = urllib.urlopen('http://automation.whatismyip.com/n09230945.asp').read()如果您不想依赖其他人,则只需上传类似以下PHP脚本的内容:
<?php echo $_SERVER['REMOTE_ADDR']; ?>
并在Python中更改网址,或者如果您更喜欢ASP,请更改以下网址:
<%Dim UserIPAddressUserIPAddress = Request.ServerVariables("REMOTE_ADDR")%>注意:我不知道ASP,但是我认为在这里安装它可能会有用,所以我用google搜索。



