Announcement

Collapse
No announcement yet.

Random number in URL for ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random number in URL for ad

    I've done a LOT of searching and have come up with no simple answer for this problem.

    Basically I use a seperate app to rotate banners on the top of my site which requires you to add a random number into the URL so that peoples browsers don't cache the image and display the same one.

    My question is, in my header code, how would I add a variable to display a random number in the ad url?? I would like to think theres a simple feature already in VB that can do this since it is so robust...

    Any ideas?

    Here is my code to insert the ad:

    Code:
    <a href='http://ads.blah.com/www/delivery/ck.php?n=a86eebef&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://ads.blah.com/www/delivery/avw.php?zoneid=1&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a86eebef' border='0' alt='' /></a>

  • #2
    Try this:

    Code:
    <img src='http://ads.blah.com/www/delivery/avw.php?zoneid=1&amp;cb=<if condition="$randomvar = TIMENOW">$randomvar</if>&amp;n=a86eebef' border='0' alt='' />
    That will use the current timestamp as the random number.

    Comment


    • #3
      Originally posted by Jake Bunce View Post
      Try this:

      Code:
      <img src='http://ads.blah.com/www/delivery/avw.php?zoneid=1&amp;cb=<if condition="$randomvar = TIMENOW">$randomvar</if>&amp;n=a86eebef' border='0' alt='' />
      That will use the current timestamp as the random number.
      You guys are awesome! That works just great...

      Thanks!

      Comment


      • #4
        Many thanks for this, I was looking for the exact same solution.
        Shawn

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X