Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $randomId = substr(md5(rand()), rand(0,20), 10);
- $tags = stripslashes($_GET['tags']);
- $image = file_get_contents('php://input');
- $im = @imagecreatefromstring($image);
- if(is_null($im) || empty($im)){
- die('invalid');
- }
- imagejpeg($im, 'temp/'.$randomId . ".jpg", 95);
- file_put_contents('temp/'.$randomId . ".json", $tags);
- echo $randomId;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement