Skip to content

Commit

Permalink
update 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
malimaliao committed Jul 21, 2023
1 parent 4e0e305 commit f2b840b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 6 additions & 6 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Developer Notes:
*
* $ts_cloud_url: TPB_TreasureShip cloud api:
* >>: format: $tpb:tpb_api_url base64@trackers:trackers_url_txt base64@from:tpb_host@
* >>: example: $tpb:aHR0cHM6Ly9waXJhdGUtcHJveHkuY2xpY2svbmV3YXBpL3EucGhwP3E9@trackers:aHR0cHM6Ly9naXRlYS5jb20vWElVMi9UcmFja2Vyc0xpc3RDb2xsZWN0aW9uL3Jhdy9icmFuY2gvbWFzdGVyL2Jlc3QudHh0@
* >>: format: tpb@<web:url><api:url><trackers:url>
* >>: example: tpb@<web:http://test.com><api:http://test.com/api/q.php?q=><trackers:http://test.com/trackers.txt>
*/

class TreasureShip{
Expand Down Expand Up @@ -86,10 +86,10 @@ public function prepare($curl, $query, $username, $password)
$tmp = file_get_contents($this->ts_cloud_url,false, stream_context_create($this->opts));
$this->DebugLog('@html:'.$tmp.PHP_EOL);
// ts_cloud_api format: $tpb:tpb_api_url@trackers:trackers_url_txt@from:tpb_host@
if(preg_match('/\$tpb:(.+?)@trackers:(.+?)@from:(.+?)@/i',$tmp,$data)){
$tpb_api = base64_decode($data[1]);
$trackers_url = base64_decode($data[2]);
$tpb_from = base64_decode($data[3]);
if(preg_match('/tpb@<web:(.+?)><api:(.+?)><trackers:(.+?)>/i',$tmp,$data)){
$tpb_from = $data[1];
$tpb_api = $data[2];
$trackers_url = $data[3];
$this->DebugLog("TPB(get success, tpb): ".$tpb_api.PHP_EOL);
$this->DebugLog("TPB(get success, trackers): ".$trackers_url.PHP_EOL);
}else{
Expand Down
9 changes: 8 additions & 1 deletion ts.css
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
/* $tpb:aHR0cHM6Ly9waXJhdGUtcHJveHkuY2xpY2svbmV3YXBpL3EucGhwP3E9@trackers:aHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL25nb3NhbmcvdHJhY2tlcnNsaXN0QG1hc3Rlci90cmFja2Vyc19iZXN0LnR4dA==@from:aHR0cHM6Ly9waXJhdGUtcHJveHkubW92@ */
/*
version: 1.1(old)
$tpb:aHR0cHM6Ly9waXJhdGUtcHJveHkuY2xpY2svbmV3YXBpL3EucGhwP3E9@trackers:aHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL25nb3NhbmcvdHJhY2tlcnNsaXN0QG1hc3Rlci90cmFja2Vyc19iZXN0LnR4dA==@from:aHR0cHM6Ly9waXJhdGUtcHJveHkubW92@
version: 1.2+(new)
tpb@<web:https://pirate-proxy.click><api:https://pirate-proxy.click/newapi/q.php?q=><trackers:https://cdn.jsdelivr.net/gh/ngosang/trackerslist@master/trackers_best.txt>
*/

0 comments on commit f2b840b

Please sign in to comment.