php小偷程序 代码
index.php<?php
$con = file_get_contents("http://it.sohu.com/s2010/5651/s274087241/index.shtml");
$preg="/·<a href=(.*) target=_blank>(.*)<\/a>/U";
preg_match_all($preg,$con,$arr);
foreach($arr as $id=>$v){
echo "<a href=view.php?url=$v>".$arr[$id]."</a><br>";
}
?>
view.php
<?php
$con = file_get_contents($_GET);
$preg="/<h1>(.*)<\/h1>/";
preg_match($preg,$con,$arr);
echo "<h1>".$arr."</h1>";
echo "<hr>";
$preg2="/<div class=\"text clear\" id=\"contentText\" collection=\"Y\">(.*)<\/div>/s";
preg_match($preg2,$con,$arr2);
echo $arr2;
?>
页:
[1]