Issues with your account? Bug us in the Discord!

PHP Help

Rogue TraderRogue Trader Somebody stop him...
Hey fellow firstones! I'm redesigning my video game weblog that I run with a bunch of friends and I got a question about PHP code. What we want to do is take our collection of Wallpapers we've gathered over the last year or so (close to 400) have them randomly display as thumbnails that when you click on them they take you to the full size image. I was hoping someone around these parts could help me out with it. I'd be much appreciated!!

Comments

  • Random ChaosRandom Chaos Actually Carefully-selected Order in disguise
    Randomization? array_rand will pop an element (such as a file name) off an array.

    Make sure that if you pass the filename via a query string for the full size version that you slap basename($filename) on the name so that you don't have any filesystem attacks.

    You might also want to look at lightboxes in JavaScript which might do a lot of what you want to do without the heavy backend code.
Sign In or Register to comment.