![]() |
Looking for a simple script if someone could help that would be great
I want to show 5 categories with thumb and a link out from like 50 different categories, how can i do that in the most simple way?
the easiest for me would be insert html for each category, and it will pull 5 random out of the bunch, any scripts like that? |
make a seperator , lets use ~ for this example
save as randomhtml.txt <br> some html<div>blah</div ~ <center> some more html <i>test ~ etc ~ etc then save this as puller.php <?php // get html list $html = file_get_contents("randomhtml.txt"); // split html segments into an array $exh = explode("~",$html); // shuffle them shuffle($exh); // take 5 of them put them together into a string $fiverandom = "$exh[0] $exh[1] $exh[2] $exh[3] $exh[4]"; //output the 5 to browser echo $fiverandom; ?> |
you can pull these 5 elements into any webpage now by including this tag
<?php include("http://yoursite.com/puller.php"); ?> |
awesome thank you very much smokey much appreciated :)
|
Quote:
thanks again! |
All times are GMT -7. The time now is 08:25 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123