php help

Moonwraith

OSNN Veteran Addict
Joined
22 Oct 2004
Messages
1,133
Hey guys,

Got a major favour for all you php guys out there, now I've asked before for a dynamic sig, which i still have the php code for.. but i need something maybe a bit more advanced.. see if you guys could help me out on this one..

I'm after

"Write relevant HTML web pages and PHP to view a catalogue of images (Gif or JPEG format) stored in an image subdirectory. You should provide a simple means of selecting an imagine file and then, upon selection, the image will be displayed on a web page together with the chance to select another image

The list of files should be dynamic - your CGI script should be able to provide a list of the current contents of the image directory at any time"

Now, The current dynamic code i've got is handy; because it will load, dynmically, a random image from the folder on each refresh, but i need to do all of the above, and it's proving tricky - anyone about who knows what their doing would be awesome :)

Thanks

-Wraith
 
Last edited:
http://picklegallery.sourceforge.net/

Is an allready written PHP script which is rather easy to understand, see if you can get some ideas from them as to how to do it (Do note, DO NOT COPY AND PASTE, the code is under the GPL, and you would be infringing)
 
many thanks dude :) not gonna copy and paste anyways, my lecturers in the know on plagarism
 
Hey moon I take it your a Starcraft BW fanatic?
 
the way I would do it is first open the directory (fopen can do this I believe) then using a loop check each file within the directory to make sure its an image (getimagesize would be good here). You can either output the images at this point or add them to an array for use in outputting the page then.

you would need some input parameters in order to show a specific image, but if you show the image at the top, then below that show the array of images again.

That should work, a friend of mine uses that kind of process for his rather simple picture gallery.
 
Geffy said:
the way I would do it is first open the directory (fopen can do this I believe) then using a loop check each file within the directory to make sure its an image (getimagesize would be good here). You can either output the images at this point or add them to an array for use in outputting the page then.

you would need some input parameters in order to show a specific image, but if you show the image at the top, then below that show the array of images again.

That should work, a friend of mine uses that kind of process for his rather simple picture gallery.


How'd you do it for: http://geffy.co.uk/gallery/harcourt_place/?
 
mlakrid said:
Hey moon I take it your a Starcraft BW fanatic?

(And yeah, just to reply; loved starcraft :) thinking about it, probably time to make a new sig soon)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back