From 94d1c97f95b7a15945d18250fb1d2c37efe9b227 Mon Sep 17 00:00:00 2001 From: SuperDev Date: Thu, 12 Jan 2023 21:02:29 -0600 Subject: [PATCH] Update index.php --- admin/dashboard/index.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/admin/dashboard/index.php b/admin/dashboard/index.php index ed3933c..c70ecb7 100644 --- a/admin/dashboard/index.php +++ b/admin/dashboard/index.php @@ -66,19 +66,16 @@ return $bytes . ' B'; // get size of folders in a folder $plugin_count = count(glob('../../plugins/*', GLOB_ONLYDIR)); -// Update checker -$PATCH_URL = 'https://raw.githubusercontent.com/Supernova3339/anonfiles/main/'; -$version_filename = 'latest.txt?token=GHSAT0AAAAAAB4S7HM4SZGF7VWPABQO3KRSY5FDV4Q'; # REMOVE TOKEN // Get version - $ch = curl_init($PATCH_URL . $version_filename); + $ch = curl_init($PATCH_URL . $github_api_url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, 'AnonUpload'); $str = curl_exec($ch); - curl_close($ch); - - $server_version = str_to_version_info($str); + $latest_version = $str['tag_name']; + curl_close($ch);; ?>