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)
-   -   Free rotating script needed (https://gfy.com/showthread.php?t=430628)

Iron Mike 02-12-2005 03:04 AM

Free rotating script needed
 
Hi everyone,
I need a script that will allow me to enter gallery urls into a database and rotate them randomly when someone clicks a link, either text or thumb.
Is there a free script out there?
If the script can pull up descriptions of the galleries, that would be even better.
And/or pull up a promo thumb for the galleries... Possibly jscript?
Thanks in advance for your help. :upsidedow

emthree 02-12-2005 03:08 AM

Yes, there's tons out there
1- Learn to use google
2- If that fails, check out hotscripts.com

Dynamix 02-12-2005 03:22 AM

Create a file named "last.txt" and place one single character in it, "0" (zero). Then put the following code in rotate.php and link to it. Change the first variable to the total number of links, in the example it's 2. Add $site["x"] = "URL"; lines for each URL.


Code:

<?PHP
        $total = 2;
        $site["1"] = "http://www.ha4l.com/";
        $site["2"] = "http://www.eg4l.com/";


        $DatFile = "last.txt";
        @ $fp = fopen($DatFile, "r");
        flock($fp, 1);
        $filelength = filesize($DatFile);
        $visits = fread($fp, $filelength);
        flock($fp, 3);
        fclose($fp);

        $visits = $visits + 1;
        if ($visits > $total) { $visits = 0; }

        @ $nfp = fopen($DatFile, "w");
        flock($nfp, 2);
        fwrite($nfp, $visits);
        flock($nfp, 3);
        fclose($nfp);


header("Location: " . $site[$visits] );
?>


arnette 02-12-2005 03:22 AM

forget jscript, way too inefficient, you should have it done in php/mysql

good luck finding a free one

Dynamix 02-12-2005 03:27 AM

To display a random thumb and/or link in your page:

On your page somewhere write:

Code:

<?PHP require("random.php"); ?>
Then put the following code into a file named random.php:

Code:

<?PHP
        $total = 2;
        $site["1"] = "http://www.ha4l.com/";
        $site["2"] = "http://www.eg4l.com/";

        $thumb["1"] = "images/thumb1.gif";
        $thumb["2"] = "images/thumb2.gif";


        srand(time());
        $x = (rand()%$total);

        echo('<A HREF="' . $site[$x] . '"><IMG SRC="' . $thumb[$x] . '" BORDER=0></A>');
?>


bringer 02-12-2005 03:29 AM

i have a good one

Antonio 02-12-2005 03:38 AM

Quote:

Originally Posted by bringer
i have a good one

post it here
thanks

BlueQuartz 02-12-2005 04:27 AM

Quote:

Originally Posted by arnette
forget jscript, way too inefficient, you should have it done in php/mysql

good luck finding a free one

lol you posted that even after Dynamix had posted a free one lol

OG LennyT 02-12-2005 04:41 AM

I found a great one also.

I went to google and searched for 'rotating banners'

TimeStamp 02-12-2005 04:51 AM

i found one too its fucking the best one ever

Iron Mike 02-17-2005 05:53 AM

Thanks! hotscripts is cool :thumbsup


All times are GMT -7. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123