如何隐藏IP地址的最后一位
发布时间:2011-04-04 16:38:00
标签:ip,隐藏
首先获取ip:
<%
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then
userip=Request.ServerVariables("REMOTE_ADDR")
end If
%>
第一种方法:用Split()函数
<%
myip=Split(userip,".")
response.write myip(UBound(myip))&"<br />"
response.write myip(0)&"."&myip(1)&"."&myip(2)&"."&"*"
%>
第二种:用Left()和InstrRev()函数
<%
response.write Left(userip,InstrRev(userip,"."))&"*"&"<br />"
%>
0
投稿
猜你喜欢
- 1 介绍推导式(解析器):是Python独有的一种特性。使用推导式可以快速生成列表、元组、字典以及集合类型的数据,因此推导式又可分为列表推导
- ASP具备动态输出任一Office应用程序文件格式的功能。在开始编写代码之前,我们首先需要做的就是设置正确的文件类型,因为浏览器需要知道如何
- 本文定位:已将CPU历史数据存盘,等待可视化进行分析,可暂时没有思路。前面一篇文章(https://www.jb51.net/article
- 本文介绍了linux下如何备份与恢复mysql数据库。数据库备份是非常重要的。如果定期做好备份,这样就可以在发生系统崩溃时恢复数据到最后一次
- 大家在开发Python的过程中,一定会遇到很多反斜杠的问题,很多人被反斜杠的数量搞得头大。首先我们写一段非常简单的Python代码,它的作用
- 首先来看一个例子,正常情况下我们定义并且实例一个类如下class Foo(object):def __init__(self):  
- 如下所示:import jsonresult = response.read()result.decode('utf-8')
- 问题背景在开始正文之前,感谢用户名为怜索的朋友送给了我的博客2021年的第一个赞!import numpy as npimport matp
- //前一阵子以为学习需要就在自己的本本上装了个mysql数据库。今天想把结合jsp做的项目拿到学校机器上用用,但发现数据库数据怎么迁移,首先
- 数据备份与还原第三篇,具体如下基础概念:备份,将当前已有的数据或记录另存一份;还原,将数据恢复到备份时的状态。为什么要进行数据的备份与还原?
- 最近在做编程练习,发现有些结果的值与答案相差较大,通过分析比较得出结论,大概过程如下:定义了一个计算损失的函数:def error(yhat
- 背景一直对语音合成系统比较感兴趣,总想能给自己合成一点内容,比如说合成小说,把我下载的电子书播报给我听等等。语音合成系统其实就是一个基于语音
- 准备篇:1、配置防火墙,开启80端口、3306端口说明:Ubuntu默认安装是没有开启任何防火墙的,为了服务器的安全,建议大家安装启用防火墙
- 本文介绍了Sublime开发python程序的示例代码,分享给大家,具体如下:下载、安装Python程序https://www.python
- 前言本篇博客主要解决在使用pandas绘制图像并保存时,由于标签太长,导致坐标轴上的标签显示不全的问题。刚遇到问题时调整了一下图片大小,然鹅
- 基本思路:首先用开发者工具找到需要提取数据的标签列利用xpath定位需要提取数据的列表然后再逐个提取相应的数据:保存数据到csv:利用开发者
- 本文主要介绍了Python通过tkinter实现百度搜索的示例代码,分享给大家,具体如下:"""百度搜索可视化
- 前言Modbus协议是由Modicon公司(现在的施耐德电气Schneider Electric)推出,主要建立在物理串口、以太网TCP/I
- 今天的这一章节我们来学习一下,Python 中的三个高级函数,也被称之为 魔法函数。之所以把他们交的这么高级,主要是因为它们返回的
- 1.什么是局部视图局部视图是在其他视图中呈现的视图。通过执行局部视图生成的HTML输出呈现在调用视图中。与视图一样,局部视图使用 .csht