I need an upload script that will allow me to upload a .jpg .jpeg .gif .png .bmp file Then rename it to photo.jpg and resize it with a width of 136px and save in a folder called upload $10 if anyone can do that for me Cheers
having it rename to photo.jpg would be very stupid, as it would overwrite the file evey time, unless you meant like photo1.jpg photo2.jpg etc.?
thats the idea man I only will ever need one image in that directory, and it will need to be overwritten! kmap: any examples of previous work?
anyone? I need an upload script that will allow me to upload a .jpg .jpeg .gif .png .bmp file then convert it to a .jpg Then rename it to photo.jpg and resize it with a width of 136px and save in a folder called upload Please only pm if you can do it, not if you think you can $15 if a coder can do this
Okay, so I was bored, and had a couple minutes to kill so I decided to go ahead and write it for you. Would have had it sooner but my ftp program crashed while editing the file so had to restart. It's really like 3 lines of code, 2 echo statements and a 4 jpeg commands, wasn't much work, so enjoy. <?php if ($_FILES){ move_uploaded_file($_FILES['upload']['tmp_name'], 'upload/tmp.jpg'); resizeImage('upload/tmp.jpg', 'upload/photo.jpg'); unlink('upload/tmp.jpg'); echo '<a href="upload/photo.jpg">photo.jpg</a><br /><br />'; } echo '<b>Upload a File</b><br /><form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data"><input type="file" name="upload" /> <input type="submit" value="Upload!" /></form>'; function resizeImage($in, $out){ $size = getimagesize($in); $width = 136; $height = intval($size[1] * (136/$size[0])); $new = imagecreatetruecolor($width, $height); $old = imagecreatefromjpeg($in); imagecopyresized($new, $old, 0, 0, 0, 0, $width, $height, $size[0], $size[1]); imagejpeg($new, $out); } ?> PHP: Also to mention, you need to create a folder called upload, and chmod it to 777, otherwise it just creates tmp.jpg, resizes, saves it as photo.jpg and deletes tmp.jpg. Quick and easy, and it also keeps the aspect ratio in resizing the height so you don't get some crazy distorted image. Enjoy.
projectshifter, you need to take care of other file types, not only jpg. So you will need few minutes more to code functions for accepting gif's, bmp's, etc...
The job is done very fast I received the money (10$) ...extremely fast I don’t know does Tropica like my work ?
Hi, If the job is still open , I'm interested to work on it. Checkout my online portfolio linking from my signature. Feel free to contact me for further details. Thanks.
lol he PMed me two minutes later and took 2 minutes to add the other ones Not really sure why anyone did it afterwards but he had the copy he needed at like 4 lol. Oh well, back to work not A coders job is never done