Skip to content

Commit

Permalink
Update ul.php
Browse files Browse the repository at this point in the history
  • Loading branch information
biscoe916 committed May 29, 2013
1 parent e0c2c47 commit 593cbf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ul.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
$directory = urldecode($_GET["directory"]);
$resp_str = $_GET['resp_str'];
$new_image_name = rand(1,9999).basename($url);
$return = array();
$return['resp_str'] = $resp_str;

if(!$url || !$directory || !$sk || !$resp_str) { // Ensure we have all of the required data
$return['status'] = 'failed';
Expand All @@ -15,9 +17,9 @@
$return['status'] = 'failed';
$return['fail_reason'] = 'Unauthorized: Keys must match.';
} else {
if(file_put_contents($new_img, file_get_contents($url))) {
if(file_put_contents($new_image_name, file_get_contents($url))) {
$return['status'] = 'success';
$return['url'] = $directory.$new_img;
$return['url'] = $directory.$new_image_name;
} else {
$return['status'] = 'failed';
$return['fail_reason'] = 'Unknown Error';
Expand Down

0 comments on commit 593cbf5

Please sign in to comment.