Skip to content

Instantly share code, notes, and snippets.

@sanasol
Created November 26, 2012 09:56
Show Gist options
  • Save sanasol/4147453 to your computer and use it in GitHub Desktop.
Save sanasol/4147453 to your computer and use it in GitHub Desktop.
<?php
$uri = "http://dsro.ru/gyazo/";
if(isset($_FILES['imagedata']['name'])) {
$path = 'images/' . substr(md5(time()), -28) . '.png';
if(move_uploaded_file($_FILES['imagedata']['tmp_name'], $path)) {
echo $uri , $path;
} else {
echo $uri;
}
} else {
echo $uri;
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment