diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ec79ec6 Binary files /dev/null and b/.DS_Store differ diff --git a/ul.php b/ul.php index f2f18c3..033b269 100644 --- a/ul.php +++ b/ul.php @@ -4,8 +4,8 @@ // Get/Set values $url = urldecode($_GET["img_url"]); $sk = urldecode($_GET["secret_key"]); -$file_path = urldecode($_GET["directory"]).rand(1,9999).basename($url); -$return = array("resp_str" => urldecode($_GET["resp_str"])); +$file_path = rand(1,9999).basename($url); +$return = array("resp_str" => urldecode($_GET["resp_str"]), "full_path" => urldecode($_GET["directory"]).$file_path); if(!$url || !$file_path || !$sk) { // Ensure we have all of the required data $return["status"] = "failed"; @@ -16,7 +16,7 @@ } else { if(file_put_contents($file_path, file_get_contents($url))) { $return["status"] = "success"; - $return["url"] = $file_path; + $return["url"] = urldecode($_GET["directory"]).$file_path; } else { $return["status"] = "failed"; $return["fail_reason"] = "Unknown Error";