Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
biscoe916 committed May 29, 2013
1 parent 221bf2e commit 73ccef2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file added .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions ul.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down

0 comments on commit 73ccef2

Please sign in to comment.