From 566680fe3603f8fc12161612b5857ec024ec63e3 Mon Sep 17 00:00:00 2001 From: lolcat Date: Thu, 17 Apr 2025 20:06:42 -0400 Subject: [PATCH] ok its unfucked now --- proxy.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/proxy.php b/proxy.php index 14c0efa..726b201 100644 --- a/proxy.php +++ b/proxy.php @@ -60,17 +60,15 @@ try{ if($id === null){ - // fallback to getting ID from path - $id = explode("/", $image["path"]); - - for($i=count($id) - 1; $i>0; $i--){ + $id = explode("/th/id/", $image["path"], 2); + + if(count($id) !== 2){ - if(trim($id[$i]) != ""){ - - $id = $id[$i]; - break; - } + // malformed + return $url; } + + $id = $id[1]; } if(is_array($id)){