diff --git a/app/Client/Transmission/TransmissionRPC.php b/app/Client/Transmission/TransmissionRPC.php index 7ce9f27..32a55d3 100644 --- a/app/Client/Transmission/TransmissionRPC.php +++ b/app/Client/Transmission/TransmissionRPC.php @@ -714,6 +714,10 @@ class TransmissionRPC implements AbstractClientInterface // Setup authentication (if provided) if ($this->username && $this->password) { $contextopts['http']['header'] = sprintf("Authorization: Basic %s\r\n", base64_encode($this->username . ':' . $this->password)); + $contextopts['http']['ssl'] = array( + "verify_peer"=>false, + "verify_peer_name"=>false, + ); } if ($this->debug) { diff --git a/app/helper.php b/app/helper.php index 2c9f1a5..e5ca92b 100644 --- a/app/helper.php +++ b/app/helper.php @@ -1,6 +1,7 @@ $start_file) + { + $start_file = str_replace("\\","/",$start_file); + $offset = strripos($start_file,'/'); + if ($offset===false) { + $start_file = substr($start_file,0,-4); + } else { + $start_file = substr($start_file,$offset+1,-4); + } + // 过滤示例、过滤解码接口 + if (in_array($start_file,['axxxx','decodeBase'])) { + continue; + } + // 控制多少列 + if ($i > 4) { + $k++; + $i = 0; + } + $i++; + $j++; + $data[$k][] = $j.". ".$start_file; + } + //输出表格 + $table = new Table(); + $table->setRows($data); + echo($table->render()); +} diff --git a/init.php b/init.php index 8883f30..e0dfbd4 100644 --- a/init.php +++ b/init.php @@ -5,6 +5,7 @@ // 定义目录 defined('ROOT_PATH') or define("ROOT_PATH", __DIR__); define('DS', DIRECTORY_SEPARATOR); +defined('APP_PATH') or define('APP_PATH', ROOT_PATH.DS.'app'.DS); define('TORRENT_PATH', ROOT_PATH.DS.'torrent'.DS); // 严格开发模式 diff --git a/iyuu.php b/iyuu.php index 2101e13..91c39c6 100644 --- a/iyuu.php +++ b/iyuu.php @@ -2,6 +2,16 @@ require_once __DIR__ . '/init.php'; use IYUU\AutoReseed; +#echo "IYUUAutoReseed自动辅种脚本,目前支持以下站点:".PHP_EOL; +#ShowTableSites(); +echo <<