A basic unlimited image gallery in just 20 lines of code



The same code but in 10 lines for the viewer.php and 2 lines for each index file.

function gen_viewer( $img, $alt, $ver, $hor, $bor, $bgd, $ial, $rtn )
	echo "<html><head><style type='text/css'>body { background-image: url(" . $bgd . "); background-repeat: repeat; }</style></head><body><div align='" . $ial ."'>"<img class='main' src=" . $img . " width=" . $hor ." height=" .$ver ." border=" . $bor . " alt='" . $alt ."'><p>";
	if ( $rtn == 1 ) {
		echo "<FORM><INPUT type='button' onclick='history.back();' name='ReturnButton' value='Return'></FORM>";
	echo "</div></body>";

index file:
require( "viewer.php" );
gen_viewer( "animage.jpg", "This is a title", 500, 500, 10, "abackground.jpg", "center", 0 );

I don't understand your maths actually.

If you are doing it with php rendered static pages you still need one file per image + 1 more for the viewer + 1 more for the picture listings.

so 100 images =

100 files for the images
100 index files
1 viewer function file
1 main index
Total 202 files for 100 images (including image files themself).

This could be done in 101 files (1 containing php code + 100 image files) by using a mysql database.
Hi, you have shared really useful information with us. It has lots of worth for those people who want to start web hosting business. I'm running my own online business successfully with help of guruscript.com; it provides me scripts to make easier to my business. I'm very thankful to guruscript.comthat caters such kind of great services. Guruscript is also a great resource for those guys who are wondering to start their online business. I hope my info will help to many beginners in online world.


online business idea
the artificial egg
Called the artificial eggs, entirely by chemical synthesis, in appearance not much different with the real eggs, real ones can really easily. The artificial eggs is simply a hoax, but the artificial tiffany charm bracelet, but there are still a special training course, is this how about ah? According to related news, to defraud the company to teach tiffany silver earrings in the name of the artificial eggs, charge high the amount of training fees.