M-A

upload4

M-A
Aug 8th, 2012
148
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. + GaZa-HackeR.NeT
  6. # exit
  7. */
  8.  
  9. echo '<from method="POST" enctype="multipart/from-data" action="">
  10. Picture: <input type="file" name"picture">
  11. <input type="submit" name="1" value="Upload">
  12. </from>';
  13.  
  14. if($_POST['1'] == 'Upload'){
  15.  
  16. $size = getimagesize($_FILES ['picture'] ['tmp_name]);
  17. $width = $size[0];
  18. $height = $size[1];
  19.  
  20. if(isset($width) && isset($height)){
  21. $Upload = copy($FILES['picture'] ['tmp_name'], $FILES['picture'] ['name']);
  22.  
  23. echo ($Upload) ? "OK":"picture size not found";
  24. }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment