Advertisement
M-A

upload4

M-A
Aug 8th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?
  2. /*
  3. + Title : simple upload code (Based on width & height)
  4. | Author : Mr_AnarShi-T
  5. | y1-@live.fr
  6. + GaZa-HackeR.NeT
  7. # exit
  8. */
  9.  
  10. echo '<from method="POST" enctype="multipart/from-data" action="">
  11. Picture: <input type="file" name"picture">
  12. <input type="submit" name="1" value="Upload">
  13. </from>';
  14.  
  15. if($_POST['1'] == 'Upload'){
  16.  
  17. $size = getimagesize($_FILES ['picture'] ['tmp_name]);
  18. $width = $size[0];
  19. $height = $size[1];
  20.  
  21. if(isset($width) && isset($height)){
  22. $Upload = copy($FILES['picture'] ['tmp_name'], $FILES['picture'] ['name']);
  23.  
  24. echo ($Upload) ? "OK":"picture size not found";
  25. }
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement