• 心情随笔

二宝博客

好记性不如赖笔头
二宝博客
  • android中CleartextHTTP错误解决方案
  • 示例页面
  • 首页
  • php
    • Thinkphp
  • JS相关
  • 服务器
    • Linux
    • Windows
    • xenserv
  • DIVCSS
  • MAC
  • 软件分享
  • 恭祝大家新年快乐!

    恭祝大家新年快乐!

    恭祝大家新年快乐万事如意阖家欢乐!

    ]]>

    键盘游走者 发布于 2017-01-28 17:05心情随笔抢沙发
    查看
  • 网络宽带电话 SIP电话 拨打立即挂断 解决 488 no acceptable here

    网络宽带电话 SIP电话 拨打立即挂断 解决 488 no acceptable here

    可能是语音编码问题,设置为跟语音网关一个编码或者在IP电话上设置语音编码为自动

    ]]>

    键盘游走者 发布于 2017-01-19 22:02心情随笔抢沙发
    查看
  • 如何实现同一IP提交表单的次数限制?

    如何实现同一IP提交表单的次数限制?

    第一步,创建表,DDL如下: CREATE TABLE  ip_limit  ( id  int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id', ip  char(16) NOT NULL DEFAULT '0' COMMENT 'ip地址', form_id  int(11) NOT NULL DEFAULT '0' COMMENT '表单id', last_submit_time  int(11) NOT NULL DEFA ...

    键盘游走者 发布于 2017-01-18 18:07php抢沙发
    查看
  • PHP实现对短信验证码发送次数的限制(防机刷验证码)

    PHP实现对短信验证码发送次数的限制(防机刷验证码)

    PHP实现对短信验证码发送限制(防止机刷验证码)   对用户获取短信验证码的手机号、ip、和浏览器(使用唯一标识)进行限制。本文介绍的方法是对用户每天只能通过同一浏览器或同一ip地址获取验证码10次或者同一手机号只能获取3次短信验证码,三种限制为“或”关系,一条超限就不发验证码。方法是通过在服务器端将用户 ...

    键盘游走者 发布于 2017-01-18 18:05php抢沙发
    查看
  • 支持火狐加入收藏夹

    支持火狐加入收藏夹

    function addFavorite(obj, opts){     var _t, _u;         if(typeof opts != 'object'){                _t = document.title;                _u = location.href;                   }else{                  _t = opts.title || document.title;                 _u = opts.url || location.href;        ...

    键盘游走者 发布于 2017-01-07 21:52php抢沙发
    查看
  • php浏览历史记录

    php浏览历史记录

    /**  * 商品历史浏览记录  * $data 商品记录信息  */ private function _history($data) {     if(!$data || !is_array($data))     {         return false;     }           //判断cookie类里面是否有浏览记录     if($this->_request->getCookie('history'))     {         $history = unserialize($this->_ ...

    键盘游走者 发布于 2017-01-06 17:12php抢沙发
    查看
  • php蜘蛛类

    php蜘蛛类

    “;                 return file_put_contents($file,$content);                 }          function getLogfile($time){             if(!$time)$time=time();             $logdir = LOG_PATH.'Spider'.date('Ym', $time).'/';             if(!is_dir($logdir))mkdir($logdir);     ...

    键盘游走者 发布于 2017-01-04 22:42php抢沙发
    查看
  • 关键字 替换类 替换(随机位置) 且指定数量的关键词

    关键字 替换类  替换(随机位置) 且指定数量的关键词

    array(“Key”=>”this”,”Href”=>”this“,”ReplaceNumber”=>1),     1=>array(“Key”=>”test”,”Href”=>”test“,”ReplaceNumber”=>1) ); $str = “this is test content!”; $a = new Seokey($KeyArray,$str); $a->KeyOrderBy(); $a->Replaces(); echo $a->HtmlString; */ class Seokey{     public $KeyArray;  //关键字     public $HtmlString; //文字内容     public $ArrayCount; //关键字的个数     public $Key;     public $Href;     /*         初始化:         $keyArray 关键字 数组         $String   检索字域,文字     */     function Seokey($KeyArray,$String,$Key='Key',$Href='Href'){        $this->KeyArray=$KeyArray;        $this->HtmlString=$String;        $this->ArrayCount=count($KeyArray);        $this->Key=$Key;        $this->Href=$Href;     }     /*         关键字 按长度排序     */     function KeyOrderBy(){         usort($this->KeyArray,'sortcmp');     }     function Replaces(){                      for($i=0;$i<$this->ArrayCount;$i++){             if((integer)$this->KeyArray[$i]['ReplaceNumber'] != 0 ){                 str_replace($this->KeyArray[$i][$this->Key],”/*”.md5($this->KeyArray[$i][$this->Key]).”*/”,$this->HtmlString,$num);//$num查询到的数量                 if((integer)$this->KeyArray[$i]['ReplaceNumber']>$num) {//当关键词 需要替换的数量 大于 包含的数量时,替换全部                     $this->KeyArray[$i]['ReplaceNumber']=$num;                     $this->HtmlString=str_replace($this->KeyArray[$i][$this->Key],”/*”.md5($this->KeyArray[$i][$this->Key]).”*/”,$this->HtmlString);                     continue;                 }                 //当关键词 需要替换的数量 不大于 包含的数量时,使用 KeyStrpos($i);方法替换                 $ListNumber=array();                 $ListNumber=$this->KeyStrpos($i);//$i: 表示第$i个关键词($i从0开始)                 $RegArray=array();                 if(count($ListNumber)<1) continue;//不存在 关键词                 $n=0;                 while($n<(integer)$this->KeyArray[$i][“ReplaceNumber”]){                     $g=0;                     $x=rand(0,count($ListNumber)-1);//随机数                     for($xcn=0;$xcn<=$n;$xcn++){                         if($RegArray[$xcn]==$ListNumber[$x]){                             $g=1;                         }                     }                     if($g==0){                         $RegArray[$n]=$ListNumber[$x];                         $n++;                     }                 }                 for($c=0;$c$RegArray[$jx]){                             $TempArray=$RegArray[$c];                             $RegArray[$c]=$RegArray[$jx];                             $RegArray[$jx]=$TempArray;                         }                     }                 }                 for($c=0;$cStrposKey($this->KeyArray[$i][$this->Key],$RegArray[$c],$c);// 逐位(索引位) 替换截取到的关键字                 }                $this->HtmlString=str_replace(“/&”.md5($this->KeyArray[$i][$this->Key]).”&/”,$this->KeyArray[$i][$this->Key],$this->HtmlString);             }else{                $this->HtmlString=str_replace($this->KeyArray[$i][$this->Key],”/*”.md5($this->KeyArray[$i][$this->Key]).”*/”,$this->HtmlString);             }        }        for($i=0;$i<$this->ArrayCount;$i++){            $this->HtmlString=str_replace(“/*”.md5($this->KeyArray[$i][$this->Key]).”*/”,$this->KeyArray[$i][$this->Href],$this->HtmlString);        }     }     function StrposKey($Key,$StrNumber,$n){//在字符串里 截取关键字 并替换,从$StrNumber这个位置开始(包含$StrNumber这个位置)替换到$n(包含$n这个位置)这个位置        $this->HtmlString=substr_replace($this->HtmlString, “/*”.md5($Key).”*/”, $StrNumber, 36);     }     /* 递归 查找 关键词 所在的位置 存于数组中 */     function KeyStrpos($KeyId){         $StrListArray=array();         $StrNumberss=strpos($this->HtmlString, $this->KeyArray[$KeyId][$this->Key]);         $xf=0;         while(!($StrNumberss===false)){             $StrListArray[$xf]=$StrNumberss;             $this->HtmlString=substr_replace($this->HtmlString,”/&”.md5($this->KeyArray[$KeyId][$this->Key]).”&/”,$StrNumberss, strlen($this->KeyArray[$KeyId][$this->Key]));             $StrNumberss=strpos($this->HtmlString, $this->KeyArray[$KeyId][$this->Key]);             $xf++;         }         return $StrListArray;     }     } ?>

    ]]>

    键盘游走者 发布于 2017-01-04 22:41php抢沙发
    查看
  • 新年新气象!让2016把带走一切的不愉快,2017努力吧!

    新年新气象!让2016把带走一切的不愉快,2017努力吧!

    RT

    ]]>

    键盘游走者 发布于 2017-01-04 22:40心情随笔抢沙发
    查看
  • 列目录程序Directory Lister H5ai

    列目录程序Directory Lister H5ai

    https://larsjung.de/h5ai/

    http://www.directorylister.com/

    ]]>

    键盘游走者 发布于 2016-12-13 19:20php抢沙发
    查看
« 上一页 1 … 15 16 17 18 19 … 41 下一页 »
2026 年 6 月
一 二 三 四 五 六 日
1234567
891011121314
15161718192021
22232425262728
2930  
« 4 月    

归档

  • 最新日志
  • 热评日志
  • 随机日志
  • MobaXterm 26.4 中文汉化版
  • MySQL部署工具 v8.4.9
  • 飞牛部署JumpServer Mysql报错解决办法
  • DHCP 服务器查找器
  • 增强版tracert
  • 开心电视助手V8.2,支持安卓4.4-14 
  • 如何在Windows 7电脑上删除系统服务
  • L2TP and PPTP共存一键安装
  • C盘爆红,非微信占用,非休眠占用,非缓存占用那么可能是这个
  • 贝尔I-120E-QT光猫Telnet、导出配置文件 、语音鉴权密码
  • 开心电视助手V8.2,支持安卓4.4-14 
  • 增强版tracert
  • DHCP 服务器查找器
  • 飞牛部署JumpServer Mysql报错解决办法
  • MySQL部署工具 v8.4.9
  • MobaXterm 26.4 中文汉化版
  • Linux开关机命令:shutdown,reboot,halt,init之间的区别
  • 史上最全华为路由器交换机配置命令大合集
  • 交换机基本配置命令
  • 最新版本IDM
  • 【搜狗拼音输入法 3.2 论坛版】
  • SS for windows linux macos
  • centos 修改host
  • mysql 统计一周数据
  • 汉字转换为拼音的JavaScript库
  • DIY爱好者的必备工具合集
  • array_flip() 删除数组重复元素
  • JS(去掉前后空格或去掉所有空格)的用法
  • Cool Edit Pro消除mp3原唱原声
  • windows 10 版本一键转换

最活跃的读者

最新评论

友情链接

  • 大宝博客
  • 白俊遥

Copyright © 2008 二宝博客. Powered by WordPress. Theme by Weisay. 豫ICP备2023032064号-1.