自己写的php curl库实现整站克隆
程序员文章站
2024-02-02 10:59:58
...
有时候经常会用到一些在线手册,比如国内或国外的,有些是访问速度慢,有些是作者直接吧网站关闭了,有些是服务器总是宕机,所以还是全盘克隆到自己服务器比较爽。所已这里给了一个demogetRequest()->isCli()){ Ares_Http::error403(); } include 'CurlMulti/CurlMulti.php'; include 'CurlMulti/MyCurl.php'; include 'phpQuery.php'; }}
getAppDirectory () . '/data/manual'; $cacheDir = $this->getBaseDir () . '/cache/curl'; if (! is_dir ( $cacheDir )) { mkdir ( $cacheDir ); } $curl = new CurlMulti (); $curl->maxThread = 10; $curl->cache ['enable'] = true; $curl->cache ['enableDownload'] = true; $curl->cache ['dir'] = $cacheDir; $curl->cache ['compress'] = true; $clone = new MyCurl_Clone ( $curl, $url, $dir ); $clone->overwrite = true; $clone->start (); return false; }}
对应包含的文件我已经上传上去了http://download.csdn.net/detail/tiaozhanji_xian/8951277,免积分的
版权声明:本文为博主原创文章,未经博主允许不得转载。
推荐阅读