44 lines
2.0 KiB
PHP
44 lines
2.0 KiB
PHP
|
||
<?php
|
||
require_once __DIR__ . '/vendor/autoload.php';
|
||
require_once __DIR__ . '/support/bootstrap.php';
|
||
use yzh52521\EasyHttp\Response;
|
||
use yzh52521\EasyHttp\RequestException;
|
||
use yzh52521\EasyHttp\Http;
|
||
use support\Redis;
|
||
use support\Cache;
|
||
|
||
/**
|
||
$redis = Redis::connection('default');
|
||
$kf='ProxyCache_';
|
||
$path='/test2';
|
||
$rpath=$kf.base64_encode($path);
|
||
$ct=array('1'=>'2','3'=>'4');
|
||
$ct=json_encode($ct);
|
||
$redis->hset($rpath,'CT',$ct);
|
||
|
||
**/
|
||
/**
|
||
$auth=array('remix_userid'=>"22770140",'remix_userkey'=>"1e8f326d20604ada541b4f3a67d19946",'siteLanguageV2'=>'zh','selectedSiteMode'=>'books');
|
||
$url='http://bookszlibb74ugqojhzhg2a63w5i2atv5bqarulgczawnbmsb6s6qead.onion/dl/7228066/aa9a95';
|
||
$return=Http::withProxy('socks5h://10.1.5.2:19100')->withCookies($auth,'bookszlibb74ugqojhzhg2a63w5i2atv5bqarulgczawnbmsb6s6qead.onion')->head($url);
|
||
|
||
$size=round(($return->header('Content-Length')/1048576),2);
|
||
if($size>=30){
|
||
echo "Too Large";
|
||
}
|
||
if($return->header('Content-Type')=='text/html; charset=UTF-8'){
|
||
echo "Error 404";
|
||
}
|
||
|
||
|
||
echo("\n");
|
||
print_r($return->headers());
|
||
**/
|
||
|
||
$af= <<<EOF
|
||
attachment; filename="How to:如何不切实际地解决实际问题(What if作者新作!比尔·盖茨推荐他每一本书!百万级畅销书作者、全球科普网红兰道尔·门罗超大脑洞来袭!)... (z-lib.org).epub";filename*=utf-8''How%20to%EF%BC%9A%E5%A6%82%E4%BD%95%E4%B8%8D%E5%88%87%E5%AE%9E%E9%99%85%E5%9C%B0%E8%A7%A3%E5%86%B3%E5%AE%9E%E9%99%85%E9%97%AE%E9%A2%98%EF%BC%88What%20if%E4%BD%9C%E8%80%85%E6%96%B0%E4%BD%9C%EF%BC%81%E6%AF%94%E5%B0%94%C2%B7%E7%9B%96%E8%8C%A8%E6%8E%A8%E8%8D%90%E4%BB%96%E6%AF%8F%E4%B8%80%E6%9C%AC%E4%B9%A6%EF%BC%81%E7%99%BE%E4%B8%87%E7%BA%A7%E7%95%85%E9%94%80%E4%B9%A6%E4%BD%9C%E8%80%85%E3%80%81%E5%85%A8%E7%90%83%E7%A7%91%E6%99%AE%E7%BD%91%E7%BA%A2%E5%85%B0%E9%81%93%E5%B0%94%C2%B7%E9%97%A8%E7%BD%97%E8%B6%85%E5%A4%A7%E8%84%91%E6%B4%9E%E6%9D%A5%E8%A2%AD%EF%BC%81%EF%BC%89...%20%28z-lib.org%29.epub
|
||
EOF;
|
||
|
||
$filerealname=explode('"',explode(";",$af)[1])[1];
|
||
print_r($filerealname); |