Generate a thumb on server side with PHP or JSP

With this settings the uploader will generate a thumbnail image on server without touching the original image . On server side it will generate a copy image.


                        <!DOCTYPE html>
        <title>Generate thumb on server side</title>
        <link rel="stylesheet" type="text/css" href="css/minimal.css" />
        <script src="js/RealUploader.js"></script>
    <body><div id="targetElement"></div>
    <script type="text/javascript">
        var uploader = new RealUploader("#targetElement", {
            accept: "image/*",
            thumbHeight:            500,
            thumbWidth:             0,
            thumbPostfix:           '_thumb',
            thumbFormat:            'jpg'