//Remove the exploer'bug XSSfunction RemoveXSS($val) { $val = preg_replace('/([\x00-\x08,\x0b-\x0c,\x0e-\x19])/', '', $val); $search = 'abcdefghijklmn...
分类:
其他好文 时间:
2014-06-25 09:54:13
阅读次数:
225
今天应老板的需求,需要将不是我们的页面修改一个链接,用js+iframe应该也能实现,但是我想尝试一下php实现方法。
首先你得先把别人的页面download到你的php中,实现方法可以用curl,
file,这里有一篇文章写的不错http://www.11jn.com/phpbb/viewt...
分类:
Web程序 时间:
2014-05-23 07:15:41
阅读次数:
354
一:字符替换:strtr > str_replace >
preg_replace注意:1:一般用strtr函数的这种形式:string strtr ( string $str , array
$replace_pairs )2:如果 replace_pairs 中包含一个空 字符串 (...
分类:
Web程序 时间:
2014-05-21 23:40:35
阅读次数:
357
<?php
function replace_url ($content) {
if (empty($content)) return;
//给URL地址加上 链接
$preg = '/(?:http:\/\/)?([\w.]+[\w\/]*\.[\w.]+[\w\/]*\??[\w=\&\+\%]*)/is';
$content = preg_replace($preg, '\1',...
分类:
其他好文 时间:
2014-05-12 07:17:12
阅读次数:
316