Home > Backend Development > PHP Tutorial > php.net news interception

php.net news interception

高洛峰
Release: 2023-03-02 21:34:02
Original
917 people have browsed it

//请自己修改下面变量. 
$newsnum=7; 
$space=20; 
$width=400; 
$headclass="class5"; 
$lowerclass="class6"; 
//变量设置结束. 

print " 
$opened=$QUERY_STRING; 
if ($opened=="") { $opened="-1"; } 

print "

 
$file=file('http://www.php.net'); 

$where=""; 
$a=0; 
while ($a$file[$a]=chop ($file[$a]); 
if ($file[$a]=="") { 
$where=$a; 
break 1; 

$a++; 


$file=file('http://www.php.net'); 
$a=$where+1; 
$b=0; 
while ($b<$newsnum) { 
if (substr($file[$a],0,4)=="

" & substr($file[$a],-6,5)=="

" | substr($file[$a],0,4)=="

" & substr($file[$a],-7,5)=="

") { 
$from=$to; 
$to=$a; 


if ($to==$a & $from!="") { 
$c=$from; 
if ($b==$opened) { 
while ($c<$to) { 
if (substr($file[$c],0,9)=="
$file[$c]=eregi_replace("src="","src="http://www.php.net/",$file[$c]); 
$file[$c]=eregi_replace("href="//m.sbmmt.com/"> $file[$c]=eregi_replace("

","

$file[$c]=eregi_replace("","
",$file[$c]); 
print $file[$c]; 
$c++; 

} else { 
if (substr($file[$c],0,9)=="
$file[$c]=eregi_replace("src="","src="http://www.php.net/",$file[$c]); 
$file[$c]=eregi_replace("href="//m.sbmmt.com/"> $file[$c]=eregi_replace("

","

$file[$c]=eregi_replace("","
",$file[$c]); 
print $file[$c]; 

$b++; 

$a++; 

print "
"; 
print "
"; 
?> 

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template