I spent about an hour trying to talk him into downloading irfanview.
He didn't want to install anything on his pc to do it and he couldn't figure out how to batch resize in Photoshop.
After he attempted his own script on his server and running into probs with file sizes and couldn't figure out why, he gave up and finally followed my advice.
What he was trying to do was write a script so he would be able to upload the originals, they would be automatically resized and stored, for his mom to download later.
He had a ton of 3008x2000 photos. Resizing them to 500 pixel width with his script, he was getting internal server errors...but it worked fine with 100 pixel width.