-
-
/* - * PHP替换文章内链
- * by bbs.it-home.org
- */
- function _base64_encode($t,$str) {
- return $t.""".base64_encode($str).""";
- }
- function _base64_decode($t,$str) {
- return $t.""".base64_decode($str).""";
- }
function _keylinks($txt, $replacenum = '',$link_mode = 1) {
- /* 屏蔽原始的 a */
- $replace_a = "_base64_encode('ori_a=','
')"; $replace1_a = "stripslashes(base64_decode(''))";
$search_a = "/.*?/isxe";
$search1_a = "/ori_a=(".*?")/isxe";
$txt = preg_replace($search_a, $replace_a, $txt);
/* 屏蔽alt title src */
$search = "/(alts*=s*|titles*=s*|srcs*=s*) # find (["'])?(.*?) # find single or double quote (?(2)|s+?) # if quote found, match up to next matching # quote, otherwise match up to next space /isxe"; $replace = "_base64_encode('','')"; $replace1 = "_base64_decode('','')"; $txt = preg_replace($search, $replace, $txt); echo $txt; echo " http://bbs.it-home.org/
";
/*
$keywords = $this->data['keywords'];
if($keywords) $keywords = strpos(',',$keywords) === false ? explode(' ',$keywords) : explode(',',$keywords);
if($link_mode && !empty($keywords)) {
foreach($keywords as $keyword) {
$linkdatas[] = $keyword;
}
} else {
$linkdatas = getcache('keylink','commons');
}
if($linkdatas) {
$word = $replacement = array();
foreach($linkdatas as $v) {
if($link_mode && $keywords) {
$word1[] = '/'.preg_quote($v, '/').'/';
$word2[] = $v;
$replacement[] = ''.$v.'';
} else {
$word1[] = '/'.preg_quote($v[0], '/').'/';
$word2[] = $v[0];
$replacement[] = ''.$v[0].'';
}
}
if($replacenum != '') {
$txt = preg_replace($word1, $replacement, $txt, $replacenum);
} else {
$txt = str_replace($word2, $replacement, $txt);
}
}
*/
/* 还原原始 a */
$txt = preg_replace($search1_a, $replace1_a, $txt);
/* 还原alt title src */
$txt = preg_replace($search, $replace1, $txt);
echo $txt;
return $txt;
}
$con = " 性生活过度伤害前列腺。和谐美满的性生活,是男女生理的天然需要,是夫妻感情的粘合剂之一,是夫妻生活必不少的重要组成部分。但是有此想法的夫妻可要注意了。因为做x爱时间并非越长越好,夫妻的性生活的和谐与美满也不由性xai时间的长短来决定。反而,超时性XZ爱,还会影响到夫妻的健康,甚至引发各种疾病。
";
_keylinks($con);
?>
复制代码
|