22 / 02 / 2017

Usuarios conectados: 4

Cargando documento...



Este Sitio:













Mailing List:

Suscríbete a la lista de correo, No practico spamming y ofrece algunas ventajas.

Pulsa aquí para saber más y suscribirte.



Tecnorama >Dreamweaver Extensions


PHP Random Image

Versión para imprimir | Translate this page

With this extension you can put a random image into your document without the need of storing the names in a mysql database. The code will scan your selected folder (and subfolders, if you want to) and will select one random image.

You don't have to modify the extension's parameters everytime you upload a new image: the script searches for all the images available (gif and jpg) everytime the page is executed, so you only have to upload images to the folder you selected and they will be included in the list of available images.

To use it, select: "Server Behaviors->Tecnorama->Random Image"

Q.: Can the script search in subfolders?
A.: Yes if you want to: just select the "include subfolders" option and they will be included in the search. If you want to use only the selected folder (but not the subfolders), uncheck it.

Q.: Can I use it more than once in the same document?
A.: Yes, and you can use different folders for each random image. And you can also choose if subfolders should be included for the first random image, but not for the second, if another folder should be used for the third random image....

Q.: How can I guess the dimensions for the image the script has chosen?
A.: Don't worry, the script will do it for you and it will be added to the image properties in the resulting HTML code.
The script returns something like: <img src="image.gif" width="30" height="80"> (if "image.gif" were 30 pixel wide and 80 pixel high).

Q.: What if a folder does not contain images at all?
A.: That's part of the TODO list: At least one of the folders/subfolders must contain an image. Note that it doesn't mean that all the folders/subfolders must contain one: Only one folder/subfolder with one image is enough, even if the others are empty. 

See a demo here

New Version 1.0.1 (Sep,8 2003): Support for image extensions in uppercase (*.GIF, *.JPG, *.JPEG, *.PNG). Support for jpeg and png files.

You can download it here (current version: 1.0.1)

Comments? 39, so far. Displaying 1 ->5

1.- At last! Something clear I can unrasdtend. Thanks!

2.- This piece was a lifkjaceet that saved me from drowning. http://mtfplrr.com [url=http://abxknedvza.com]abxknedvza[/url] [link=http://ahlwqvdvjy.com]ahlwqvdvjy[/link]

3.- I'm not easily imesspred but you've done it with that posting. http://nlyxxbdybw.com [url=http://arnauapnlh.com]arnauapnlh[/url] [link=http://gvjtdwxlwr.com]gvjtdwxlwr[/link]

4.- It's a plsaruee to find someone who can think so clearly

5.- This does look prgnisimo. I'll keep coming back for more.

« Previous | 1 - 5 | 6 - 10 | 11 - 15 | 16 - 20 | 21 - 25 | 26 - 30 | 31 - 35 | 36 - 39 | Next »

Add your Comments

Escribe el código de la imagen superior:


TECNORAMA es simplemente una página personal. No sirve ni de promoción del autor ni cosas por el estilo.
Todos los códigos, textos y tutoriales son de libre uso mientras se mencione al autor (no es mucho pedir)
Este sitio es compatible con IE6/NS6/Mozilla1.0
Para contactar, puedes enviarme un e-mail a tecnorama@hotmail.com