I develop a php script to replace a current one, that will have a lot of exposure to various markets/countries. This script between others offers an photo upload functionali
apache (or whatever user your webserver runs at). I'm not sure why you wouldn't use php's default temporary directory here, since it tends to be outside of the web root too./.png/ actually matches apng.php.Steps 5 to 8 are not security-related.
Step 9: I'm assuming that your site allows everyone to see every photo. If that isn't the case, you should have a URL scheme with substantially longer URLs (say, the hashsum of the image).