Closed Thread
Results 1 to 13 of 13

Thread: random html

  1. #1
    Senior Member Szalor is an unknown quantity at this point
    Join Date
    Jul 2005
    Posts
    232

    random html

    i need a code that can display random pieces of html w/o needing cpanel/cgi center

    thanks
    any language is fine

  2. #2
    Pro Member R4g1ng is an unknown quantity at this point R4g1ng's Avatar
    Join Date
    Nov 2003
    Posts
    356
    What about php?
    I lost my signature, have you seen it?

  3. #3
    check www.hotscripts.com for php scripts
    OveRuLe.NET Hosting (Unlimited Features)
    : : In Business Since 2002 : :
    FreeBox
    A Great Remotely-Hosted ShoutBox

  4. #4
    Pro Member felguard is an unknown quantity at this point felguard's Avatar
    Join Date
    Feb 2005
    Posts
    362
    Quote Originally Posted by Szalor
    i need a code that can display random pieces of html w/o needing cpanel/cgi center

    thanks
    any language is fine
    random pieces of html?? what do you mean? images, quotes??
    iHeartLED.com - Love Your LED Endlessly

  5. #5
    Senior Member Szalor is an unknown quantity at this point
    Join Date
    Jul 2005
    Posts
    232
    pieces of html

  6. #6
    what you need the code to do ?
    OveRuLe.NET Hosting (Unlimited Features)
    : : In Business Since 2002 : :
    FreeBox
    A Great Remotely-Hosted ShoutBox

  7. #7
    Senior Member Szalor is an unknown quantity at this point
    Join Date
    Jul 2005
    Posts
    232
    display random ads, whether its an image ad or cicksor/google etc.

  8. #8
    Pro Member felguard is an unknown quantity at this point felguard's Avatar
    Join Date
    Feb 2005
    Posts
    362
    you could use this to for random images that link to something:

    PHP Code:
    <? 

    $image
    [] = "<a href=\"http://URL.com\"><img src=\"img1.gif\"></a>"
    $image[] = "<a href=\"http://URL.com\"><img src=\"img2.gif\"></a>"
    //and so on 

    echo $banner[array_rand($image)]; 

    ?>
    but if your gonna randomize like google ads, i think you have to replace it with files of your ad script.
    iHeartLED.com - Love Your LED Endlessly

  9. #9
    Senior Member Szalor is an unknown quantity at this point
    Join Date
    Jul 2005
    Posts
    232
    thanks for this
    its a real help

  10. #10
    Pro Member felguard is an unknown quantity at this point felguard's Avatar
    Join Date
    Feb 2005
    Posts
    362
    no prob
    iHeartLED.com - Love Your LED Endlessly

  11. #11
    b& ryza is an unknown quantity at this point
    Join Date
    Oct 2002
    Posts
    426
    same thing here posted by me:
    http://www.freewebspace.net/forums/s...ad.php?t=71799

    but I think felguard's version is better^, looks smaller anyway.
    I think array_rand() is for picking multiple items so it may be slower?

  12. #12
    Pro Member R4g1ng is an unknown quantity at this point R4g1ng's Avatar
    Join Date
    Nov 2003
    Posts
    356
    I got a nice simple tutorial, I know you have a script already but if anyone wants it,
    http://www.daydreamgraphics.com/d/tutorial/list/220/2
    The include code is meant to be <?php include("random.php"); ?> I missed the ?.
    I lost my signature, have you seen it?

  13. #13
    b& ryza is an unknown quantity at this point
    Join Date
    Oct 2002
    Posts
    426
    Great tut.

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts