GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Looking for a simple script if someone could help that would be great (https://gfy.com/showthread.php?t=950006)

Oracle Porn 01-24-2010 11:40 AM

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?

SmokeyTheBear 01-24-2010 12:13 PM

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;
?>

SmokeyTheBear 01-24-2010 12:16 PM

you can pull these 5 elements into any webpage now by including this tag

<?php include("http://yoursite.com/puller.php"); ?>

Oracle Porn 01-24-2010 12:18 PM

awesome thank you very much smokey much appreciated :)

Oracle Porn 01-24-2010 12:18 PM

Quote:

Originally Posted by SmokeyTheBear (Post 16778942)
you can pull these 5 elements into any webpage now by including this tag

<?php include("http://yoursite.com/puller.php"); ?>

give me some credit lol :)

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