站内公告:

亲友传真---海外信息直接看 https://qycz.org

Main Menu

回覆帖子

发送站内短信时发生以下错误:
警告: 该贴已经至少 180 天没有更改。
除非你一定要回复,否则也许考虑发一个新贴会更好。
Note: this post will not display until it has been approved by a moderator.
Attachments: (Clear attachments)
限制: 每篇帖子 3 (3 remaining), maximum total size 8.00 MB, maximum individual size 2.00 MB
请将要删除的附件取消勾选
Click or drag files here to attach them.
进阶选项(包含帖子状态和附件)...
验证码:
请将此框留空:
《九评共产党》一共有几评?(请用阿拉伯数字回答):
Shortcuts: ALT+S post or ALT+P preview

帖子总览

作者 bbbbb
 - 三月 01, 2011, 08:23:31 上午
申请一个php空间,把这个php文件传上去,保持长期能够上动态网

<?php
function csubstr($string,$start,$sublength) {
  $string_s = substr($string,0,$start);
     $parity_s= 0;
  for($i=0;$i<$start;$i++){
   $temp_str=substr($string_s,$i,1);
    if(Ord($temp_str)>127) $parity_s+=1;
  }
  if($parity_s%2==1) {
   $start += 1;
  }

$len = strlen($string);
if ($len <= $sublength){
  $string = substr($string,$start,$sublength);
}else{
  $string = substr($string,$start,$sublength);
  $parity= 0;
  for($j=0;$j<$sublength;$j++){
   $temp_str=substr($string,$j,1);
    if(Ord($temp_str)>127) $parity+=1;
  }
  if($parity%2==1) {
   $string=substr($string,0,($sublength-1))."";
  } else {
   $string=substr($string,0,$sublength)."";
  }
}
return $string;
}


$fp = fopen("http://www.dongtaiwang.com/loc/phome.php","r") or die("超时!");
$content = file_get_contents("http://www.dongtaiwang.com/loc/phome.php");
$s_start= stripos ($content,"当前网址");
$s_end = stripos ($content,"解析域名");
$s_k=$s_end-$s_start;

$content=csubstr($content,$s_start,$s_k);

$content=str_replace("当前网址","",$content);
$content=str_replace("<div id=\"title_sub_right\">当前IP","<br />",$content);
$content=str_replace("</div>","",$content);
$content=str_replace("<div id=\"content_list_right1\">","",$content);
$content=str_replace("<!--","",$content);
$content=str_replace("-->","",$content);
$content=str_replace("<tr><td ><form name=\"subscribe\" method=get action=\"processSubscribe.php\"><FONT class=title><br>","",$content);
$content=str_replace("<B>电子邮件订阅</B><br><input type=text size=18 name=email><br>","",$content);
$content=str_replace("<input type=submit name=submit value=\"订阅\" ></form></td></tr>","",$content);
$content=str_replace("<div id=\"title_sub_right\">当前IP","<br />",$content);
$content=str_replace("<div id=\"content_list_right1\">","",$content);
$content=str_replace("<li>","<br />",$content);
$content=str_replace("</li>","<br />",$content);
$content=str_replace("<br>","<br /><br />",$content);
$content=str_replace("<div id=title_sub_right>","",$content);
$content=str_replace("target=new","target=_blank",$content);

echo $content;
?>