furnace Posted January 21, 2008 Share Posted January 21, 2008 Hi everyone, first post - so welcome to me I've written a script that will deal with a maximum of 15 uploaded images. If the script recieves more, it won't run - the sending page only has the ability to send up to 15, so if it recieves more it must be coming from elsewhere. It will only allow JPEG, GIF, BMP and PNG images too, with a filesize of around 1.1MB. It's going to run on shared hosting, and might become a well used feature of the site, so I'm trying to keep CPU useage down to a minimum whilst keeping it secure. Here is the script - you might want to paste it in to your preferred IDE as I couldn't get pastebin's syntax highlighting to do its job properly! http://www.pastebin.cz/show/3258 Is there anything there that could be made faster? Is the script generally OK or do I need to do things better? I'm a self-taught php programmer and I always wonder if I'm doing things the "correct" way. Anyways, any help on this script would be really appreciated Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/87041-need-to-make-script-less-cpu-intensive-can-you-have-a-look-at-it/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.