"; $message .= "Filename: ".$newfilename."
"; $message .= "Resolution: ".$image_properties['0']."px x ".$image_properties['1']."px!
"; $message .= "Mime: ".$image_properties['mime']."!
"; } else { echo "$name isnt a image, or isnt an acceptable format!"; return 0; } } function countfiles() { global $dir; $filecount = 0; $files = glob($dir . "*"); if ($files){ $filecount = count($files); } return $filecount; } function getFileExt($filename) { return substr(strrchr($filename,'.'),1); } function getFilesize($file,$digits = 2) { if (is_file($file)) { $filePath = $file; if (!realpath($filePath)) { $filePath = $_SERVER["DOCUMENT_ROOT"].$filePath; } $fileSize = filesize($filePath); $sizes = array("TB","GB","MB","KB","B"); $total = count($sizes); while ($total-- && $fileSize > 1024) { $fileSize /= 1024; } return round($fileSize, $digits)." ".$sizes[$total]; } return false; } function is_image($path) { $a = getimagesize($path); $image_type = $a[2]; if(in_array($image_type, array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM, IMAGETYPE_BMP, IMAGETYPE_ICO, IMAGETYPE_IFF, IMAGETYPE_XBM, IMAGETYPE_WEBP, IMAGETYPE_PSD)) ) { return true; } return false; } function checkMissing() { global $uploaddir; if (!file_exists($uploaddir)) { mkdir("$uploaddir", 0755); chmod("$uploaddir", 0755); $output .= ' Missing: uploads folder




Directory: '.$uploaddir.' wasnt found.


Creating it: mkdir '.$uploaddir.'/
Setting permissions: chmod 755 '.$uploaddir.'/
Click to Continue




'; echo $output; return 0; } if (!file_exists(".htaccess")) { $file = '.htaccess'; $contents = ' RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] RewriteRule "^takeapeek/(.*)$" "/'.$uploaddir.'/$1" RewriteRule "^i/(.*)$" "/'.$uploaddir.'/$1" RewriteRule "^view/(.*)$" "/'.$uploaddir.'/$1" Options -Indexes -MultiViews '; file_put_contents($file, $contents); chmod(".htaccess", 0644); $output .= ' Missing: .htaccess




File: .htaccess wasnt found.


Creating it: touch .htaccess
Writing .htaccess settings ... Done
Click to Continue




'; echo $output; return 0; } } checkMissing(); ?> Image Hosting: Powered by justla.me
go home - hide uploaded images'; }else{ echo 'show uploaded images'; } ?>


Free Image Hosting!



Accepted Formats: jpg, jpeg. bmp, png, gif

Not Accepted Formats: TIFF_II, TIF_MM






"; echo "http://".$_SERVER['HTTP_HOST']."/takeapeek/".$newname.".".$ext.""; } ?>

listing current images
'; foreach ($files as $file) { $mod_date=date("F d Y [H:m:s]", filemtime($dir.'/'.$file)); echo '
  • '.$mod_date,': '.$file.' - size: '.getFilesize($dir.'/'.$file).'
'; } echo '
'; } ?>