Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. <?php
  2.  
  3. $randomId = substr(md5(rand()), rand(0,20), 10);
  4.  
  5. $tags = stripslashes($_GET['tags']);
  6. $image = file_get_contents('php://input');
  7. $im = @imagecreatefromstring($image);
  8. if(is_null($im) || empty($im)){
  9. die('invalid');
  10. }
  11. imagejpeg($im, 'temp/'.$randomId . ".jpg", 95);
  12. file_put_contents('temp/'.$randomId . ".json", $tags);
  13. echo $randomId;
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement