Jump to content

Need to make script less CPU-intensive... Can you have a look at it?


furnace

Recommended Posts

Hi everyone, first post - so welcome to me :D

 

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.