first
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
|
||||
<?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());
|
||||
**/
|
||||
$name=base64_encode('/asss/sssc');
|
||||
if(!is_dir(base_path().'/books/'.date("Y/m/"))){
|
||||
mkdir(base_path().'/books/'.date("Y/m/"),0777,true);
|
||||
}
|
||||
$filepath=base_path().'/books/'.date("Y/m/").$name.'bin';
|
||||
$file = fopen("$filepath","w");
|
||||
fclose($file);
|
||||
Reference in New Issue
Block a user