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)
-   -   Good randomizer code? (https://gfy.com/showthread.php?t=781862)

StickyGreen 11-03-2007 11:50 PM

Good randomizer code?
 
All the randomizer codes I can find only do specific things like text or images. I need to randomize a whole block of html that includes a .flv movie and some text links. Is there a script that can randomize something like that?

GreyWolf 11-04-2007 12:06 AM

Quote:

Originally Posted by StickyGreen (Post 13328253)
All the randomizer codes I can find only do specific things like text or images. I need to randomize a whole block of html that includes a .flv movie and some text links. Is there a script that can randomize something like that?

No problemo SG - You are talking about my fav subject - "web blocks" :winkwink:

As an intro - try the simple script at this site - it's called Randex -
http://www.teca-scripts.com/free/

OK.. it's an easy example, (we have developed this concept a lot further and more complex to cover many things), but by using the base concept you can deliver up specific "web block" sizes to fit any page. Web blocks can contain "anything" - images, html, feeds, text links etc :thumbsup

StickyGreen 11-04-2007 12:15 AM

I goto free downloads but I can't get it to work. I put my name and email address and click download but it just refreshes... :Oh crap

SmokeyTheBear 11-04-2007 01:12 AM

with php or javascript /ajax ?

SmokeyTheBear 11-04-2007 01:20 AM

a simple way would be just to place your html blocks into blank pages then call an iframe randomly with javascript

like place your random html into seperate html pages
random0.html

thru

random4.html

Code:

<script>
var rn= Math.floor(Math.random()*5);
document.write("<iframe width=800 height=100 src=random" + rn + ".html></iframe>");
</script>


StickyGreen 11-04-2007 01:22 AM

Quote:

Originally Posted by SmokeyTheBear (Post 13328437)
a simple way would be just to place your html blocks into blank pages then call an iframe randomly with javascript

like place your random html into seperate html pages
random0.html

thru

random4.html

Code:

<script>
var rn= Math.floor(Math.random()*5);
document.write("<iframe width=800 height=100 src=random" + rn + ".html></iframe>");
</script>


Cool... I'm gonna try that... :thumbsup

woj 11-04-2007 01:38 AM

or with php

<?php include('file'.mt_rand(1,5).'.html';?>

StickyGreen 11-04-2007 01:49 AM

Quote:

Originally Posted by SmokeyTheBear (Post 13328437)
a simple way would be just to place your html blocks into blank pages then call an iframe randomly with javascript

like place your random html into seperate html pages
random0.html

thru

random4.html

Code:

<script>
var rn= Math.floor(Math.random()*5);
document.write("<iframe width=800 height=100 src=random" + rn + ".html></iframe>");
</script>


Thanks Smokey... works like a charm... :smokin

GreyWolf 11-04-2007 02:27 AM

Quote:

Originally Posted by StickyGreen (Post 13328337)
I goto free downloads but I can't get it to work. I put my name and email address and click download but it just refreshes... :Oh crap

Damn.. sorry man. Webmasters! :winkwink:

If you still want this - just bump the thread. Got their version lying around someplace :thumbsup


All times are GMT -7. The time now is 12:07 PM.

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