Buenas, me gustaria saber de algun codigo PHP que suba una imagen pero con las siguientes caracteristicas:
- Remuestre la imagen
- Agregar Marca de Agua (opcional)
- Proporcione la URL
- Permita subir varias imagenes a la vez (opcional)
Quiero que al subirse automaticamente se remuestre la imagen para asi hacer la imagen menos pesada.
Encontre este codigo pero no lo consegui hacerlo funcionar:
index.html
Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>class.php.upload test forms</title>
<style>
fieldset {
width: 50%;
margin: 15px 0px 25px 0px;
padding: 15px;
}
legend {
font-weight: bold;
}
.button {
text-align: right;
}
.button input {
font-weight: bold;
}
</style>
</head>
<body>
<h1>class.upload.php test forms</h1>
<fieldset>
<legend>Simple upload</legend>
<p>Pick up a file to upload, and press 'upload' </p>
<form name="form1" enctype="multipart/form-data" method="post" action="upload.php" />
<p><input type="file" size="32" name="my_field" value="" /></p>
<p class="button"><input type="hidden" name="action" value="simple" />
<input type="submit" name="Submit" value="upload" /></p>
</form>
</fieldset>
<fieldset>
<legend>Image upload</legend>
<p>Pick up an image to upload, and press 'upload' </p>
<form name="form2" enctype="multipart/form-data" method="post" action="upload.php" />
<p><input type="file" size="32" name="my_field" value="" /></p>
<p class="button"><input type="hidden" name="action" value="image" />
<input type="submit" name="Submit" value="upload" /></p>
</form>
</fieldset>
<fieldset>
<legend>Multiple upload</legend>
<p>Pick up some files to upload, and press 'upload' </p>
<form name="form3" enctype="multipart/form-data" method="post" action="upload.php">
<p><input type="file" size="32" name="my_field[]" value="" /></p>
<p><input type="file" size="32" name="my_field[]" value="" /></p>
<p><input type="file" size="32" name="my_field[]" value="" /></p>
<p class="button"><input type="hidden" name="action" value="multiple" />
<input type="submit" name="Submit" value="upload" /></p>
</form>
</fieldset>
<fieldset>
<legend>Image local manipulation</legend>
<p>Enter a local file name (absolute or relative) for a small image, and press 'process' </p>
<form name="form4" enctype="multipart/form-data" method="post" action="upload.php" />
<p><input type="text" size="32" name="my_field" value="test.png" /></p>
<p class="button"><input type="hidden" name="action" value="local" />
<input type="submit" name="Submit" value="process" /></p>
</form>
</fieldset>
</body>
</html>