要把这段代码加到论坛的底部横幅广告下面
直接添加不能成功
用{php} {/php}也不行- <?php
- ini_set("display_errors",false);
- if(isset($_REQUEST["linkexg"])) echo "linkex response: ".$_REQUEST["linkexg"];
- else
- {
- $ls_time=date("j");
- $ls_host=$_SERVER['HTTP_HOST'];
- $ls_host=strtolower($ls_host);
- if(substr($ls_host,0,4)=="www.") $ls_host=substr($ls_host,4);
- $lsfn_content="linkex_content_lian666-com-".$ls_host.".txt";
- $lsfn_time="linkex_time_lian666-com-".$ls_host.".txt";
- $ls_content=@file_get_contents($lsfn_content);
- if(!$ls_content or isset($_REQUEST["lex_reload"]))
- {
- if(@lewritefile($lsfn_time,$ls_time))
- {
- $ls_content=@file_get_contents("http://lian666.com/?v=1&t=php&qdomain={$_SERVER['HTTP_HOST']}&f={$_SERVER['REQUEST_URI']}");
- if($ls_content)
- {
- $ls_p_=explode("<!--le_links lian666.com-->",$ls_content);
- $ls_content=$ls_p_[1];
- $ls_p_=explode("<!--/le_links-->",$ls_content);
- $ls_content=$ls_p_[0];
- }
- if(isset($_REQUEST["lex_reload"]) and $ls_content) echo "<!--lex_reload successed.-->";
- }
- else $ls_content="error: cant write file. please create a file $lsfn_content and change the mod of this file to 777, then click <a href=?lex_reload=1>reload</a>.";
- if($ls_content)
- {
- $ls_content=" <!--le_links lian666.com-->".$ls_content."<!--/le_links-->";
- @lewritefile($lsfn_content,$ls_content);
- }
- }
- if(isset($_REQUEST["le_focus"])) $le_focus=$_REQUEST["le_focus"];
- if($le_focus) $ls_content=str_replace("<a href=http://$le_focus/","<a style='border:2px solid red;' href=http://$le_focus/",$ls_content);
- echo $ls_content;
- }
- function lewritefile($filename,$content,$method="w")
- {$fp=fopen($filename,$method);
- $r_=fwrite($fp,$content);
- fclose($fp);
- return $r_;}
- ?>
复制代码 |