473,499 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Script to Resize & Upload photos

Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.

Jon

Apr 5 '06 #1
2 2202
Wei
It is actually very easy if you have GD lib in your php package.

http://us2.php.net/manual/en/functio...opyresized.php

or if you have imagemagick installed, you can use command "convert -resize
a.jpg b.jpg"
On Wed, 05 Apr 2006 09:28:10 -0700, attenborough wrote:
Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.

Jon


Apr 5 '06 #2
at**********@gmail.com schrieb:
Hi, am hoping that someone may be able to help me. Im designing a small
website using PHP and MySQL. I would like to allow my visitors to
upload a photo via a form on it. Im worried that people will be trying
to upload 1mb+ images, so i am looking for a php script that will
resize that image down to a managable 50kb file (or there abouts) and
also give me a small thumbnail to use. Presumably then the script would
also delete the original 1mb+ photo from the server. Ive been searching
through google for an answer, but with not a great deal of luck. Thanks
in advance.


If you want to ask a question in more than one newsgroup please
crosspost (send it to all groups at once) rather than multipost.

You find my answer in alt.php.

--
Markus
Apr 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2012
by: mandr | last post by:
Bonjour , j'ai un petit pb sur mon script suivant : <?php // Ouverture de la session session_start();
1
2714
by: Willoughby Bridge | last post by:
I am trying to create a php script to allows users to upload photos: The first file looks like this: <html> <head>
2
1719
by: J'son | last post by:
Guys, I have built an application for a client that allows people to list their products for sale along with a photo of the product. If the photo is too big, I currently resize it down when the...
1
2209
by: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are...
4
5875
by: Jim Michaels | last post by:
after a file upload, $_FILES is not populated but $_POST is. what's going on here? $_POST=C $_POST=C $_POST=C $_POST=C:\\www\\jimm\\images\\bg1.jpg $_FILES= $_FILES= $_FILES=
1
3926
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need ...
5
3261
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is...
3
1583
by: K. | last post by:
Hello! I would like to create php code for uploading photos into the server. However, it would not be so easy script to create. I would like to upload unlimited number of photos into the ftp...
3
5149
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
7180
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.