Update upload.php

Should improve your code, and increase performance by eliminating about 11 function calls.

Oh, and Reddit brought me here. :smile: 
http://www.reddit.com/r/shittyprogramming/comments/2ppsqk/url_generator/