一个小偷程序的问题大家帮看看
时间:2010-09-16
来源:互联网
我是一个PHP最菜的菜鸟,一点不懂也想学学谢谢支持
<?php
include_once(dirname(__FILE__).'/common.inc.php');
$http_host=strtolower($_SERVER['HTTP_HOST']);
$request_url=$_SERVER['REQUEST_URI'];
//上面代码是不是获取页面地址的?
$url='http://'.$domain.$request_url; //这里设置变量吧
$url=replaceURL($url,'unreplace'); //
//---------------------------------------------------------------------------------------
if (!empty($_POST)) {
$http->post($url,$_POST);
$html=$http->body();
} else {
if ($cachetime>0) {
if (!$html=$cache->get($url)) {
$html=$http->html($url);
$cache->save($html);
}
} else {
$html=$http->html($url);
}
}
//if (strpos($html,'0.31')!==false) { file_put_contents('g:/a.txt',$url); }
//---------这一段开始是什么作用呢?是不是只获取.html结束的地址?htm结束的可以吗或都.html?lpig=lolg像这样的可以吗
$html=common_replace($html);
if ($request_url=='/') {
include(ROOT.'/_index.php');
} elseif (preg_match('|/\d+-\d+-\d+\.html$|i',$request_url)) {
include(ROOT.'/_list.php');
} elseif (preg_match('|/\d+\.html$|i',$request_url)) {
include(ROOT.'/_page.php');
}
echo $html;
<?php
include_once(dirname(__FILE__).'/common.inc.php');
$http_host=strtolower($_SERVER['HTTP_HOST']);
$request_url=$_SERVER['REQUEST_URI'];
//上面代码是不是获取页面地址的?
$url='http://'.$domain.$request_url; //这里设置变量吧
$url=replaceURL($url,'unreplace'); //
//---------------------------------------------------------------------------------------
if (!empty($_POST)) {
$http->post($url,$_POST);
$html=$http->body();
} else {
if ($cachetime>0) {
if (!$html=$cache->get($url)) {
$html=$http->html($url);
$cache->save($html);
}
} else {
$html=$http->html($url);
}
}
//if (strpos($html,'0.31')!==false) { file_put_contents('g:/a.txt',$url); }
//---------这一段开始是什么作用呢?是不是只获取.html结束的地址?htm结束的可以吗或都.html?lpig=lolg像这样的可以吗
$html=common_replace($html);
if ($request_url=='/') {
include(ROOT.'/_index.php');
} elseif (preg_match('|/\d+-\d+-\d+\.html$|i',$request_url)) {
include(ROOT.'/_list.php');
} elseif (preg_match('|/\d+\.html$|i',$request_url)) {
include(ROOT.'/_page.php');
}
echo $html;
[ 此帖被qq19836718在2010-09-16 14:46重新编辑 ]
作者: qq19836718 发布时间: 2010-09-16
common.inc.php里面的源码如下
<?php
error_reporting(E_ALL &~ E_NOTICE);
ob_implicit_flush();
//@set_time_limit(300);
//session_start();
//header('Content-Type: text/html; charset=utf-8');
define('ROOT',dirname(__FILE__));
include_once(ROOT.'/config.php');
set_include_path(ROOT.'/PEAR');
include_once('HTTP/myClient.php');
$http = new myHttpClient();
$httpHeader = array(
'Referer' => 'http://ask.39.net/',
'Accept-Language' => 'zh-cn',
'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',
//'Accept-Encoding' => 'gzip, deflate',
);
$http->setDefaultHeader($httpHeader);
$http->setMaxRedirects(0);
$http->autoReferer=false;
include(ROOT.'/cache.class.php');
$options=array(
'cacheDir' => ROOT.'/cache',
'lifeTime' => 3600*$cachetime,
// 'dirLevels' => $cacheDirLevels,
);
$cache=new Cache($options);
////////////////////////////////////
function pp($v,$d=null)
{
echo '<pre>';
print_r($v);
echo '</pre>';
$d ? die : null;
}
function regMatch($str, $regStr, $striphtml=true)
{
if (preg_match($regStr, $str, $result)) {
if (isset($result[1])) {
$r= trim($result[1]);
} else {
$r= trim($result[0]);
}
$rr= $striphtml ? strip_tags($r) : $r;
return trim($r);
} else {
return null;
}
}
<?php
error_reporting(E_ALL &~ E_NOTICE);
ob_implicit_flush();
//@set_time_limit(300);
//session_start();
//header('Content-Type: text/html; charset=utf-8');
define('ROOT',dirname(__FILE__));
include_once(ROOT.'/config.php');
set_include_path(ROOT.'/PEAR');
include_once('HTTP/myClient.php');
$http = new myHttpClient();
$httpHeader = array(
'Referer' => 'http://ask.39.net/',
'Accept-Language' => 'zh-cn',
'User-Agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',
//'Accept-Encoding' => 'gzip, deflate',
);
$http->setDefaultHeader($httpHeader);
$http->setMaxRedirects(0);
$http->autoReferer=false;
include(ROOT.'/cache.class.php');
$options=array(
'cacheDir' => ROOT.'/cache',
'lifeTime' => 3600*$cachetime,
// 'dirLevels' => $cacheDirLevels,
);
$cache=new Cache($options);
////////////////////////////////////
function pp($v,$d=null)
{
echo '<pre>';
print_r($v);
echo '</pre>';
$d ? die : null;
}
function regMatch($str, $regStr, $striphtml=true)
{
if (preg_match($regStr, $str, $result)) {
if (isset($result[1])) {
$r= trim($result[1]);
} else {
$r= trim($result[0]);
}
$rr= $striphtml ? strip_tags($r) : $r;
return trim($r);
} else {
return null;
}
}
作者: qq19836718 发布时间: 2010-09-16
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28