Random URL code

Discussion in 'HTML' started by iPleb, Feb 14, 2008.

  1. iPleb

    iPleb Guest

    I'm stuck on with this one ...

    I have a blog and have a small section designated to place an image. The
    image is actually embeded in an iFrame.

    I am trying to find some code that will let me list a selection of urls that
    feed the iframe, and then have them chosen randomly on each page load.

    Does this make sense?

    The page is a drupal blog so uses php

    Any ideas?

    Thanks

    Simon
     
    iPleb, Feb 14, 2008
    #1
    1. Advertising

  2. iPleb

    Jeff Guest

    iPleb wrote:
    > I'm stuck on with this one ...
    >
    > I have a blog and have a small section designated to place an image. The
    > image is actually embeded in an iFrame.
    >
    > I am trying to find some code that will let me list a selection of urls that
    > feed the iframe, and then have them chosen randomly on each page load.
    >
    > Does this make sense?


    Not really.

    Assuming you have these URLs stuffed in a database table somewhere.
    You can use an "ORDER BY RAND()" clause in your PHP mysql select clause.
    This is not very complex work if you have some experience with this.

    Jeff
    >
    > The page is a drupal blog so uses php
    >
    > Any ideas?
    >
    > Thanks
    >
    > Simon
    >
    >
     
    Jeff, Feb 14, 2008
    #2
    1. Advertising

  3. iPleb

    richard Guest

    On Thu, 14 Feb 2008 17:04:36 GMT, "iPleb" <> wrote:

    >I'm stuck on with this one ...
    >
    >I have a blog and have a small section designated to place an image. The
    >image is actually embeded in an iFrame.
    >
    >I am trying to find some code that will let me list a selection of urls that
    >feed the iframe, and then have them chosen randomly on each page load.
    >
    >Does this make sense?
    >
    >The page is a drupal blog so uses php
    >
    >Any ideas?
    >
    >Thanks
    >
    >Simon
    >



    Look into using "random" as well as "Select case".
    Each time the random generate picks a number, select case does the
    actual work.

    --
    "Tell a lie often enough, loud enough, and long enough and people will believe you."
    Adolph Hitler
     
    richard, Feb 14, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    885
  2. Elmar Baumann
    Replies:
    0
    Views:
    632
    Elmar Baumann
    Feb 2, 2004
  3. globalrev
    Replies:
    4
    Views:
    797
    Gabriel Genellina
    Apr 20, 2008
  4. Just D.
    Replies:
    0
    Views:
    511
    Just D.
    Aug 11, 2004
  5. VK
    Replies:
    15
    Views:
    1,286
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page