Help with iframe script.

jdem02

Registered Member
Joined
Jan 16, 2010
Messages
56
Reaction score
1
Ok I have a simple script iframe script i use after people sign up for my mailing list. They confirm email and they hit an offer page. I'm wondering if I can rotate urls so when the next person visits it's a different offer. Thanks!
Code:
<html>
<head>
    <title>Thanks For Subscribing</title>
    <meta name="keywords" content="Page Title Here " />
    <meta name="description" content="Page Title Here " />
    
    <style>
    * {
        margin: 0;
        padding: 0;
    }
    body {
        margin: 0;
        padding: 0;
    }
    </style>
</head>

<body>
<img src="url">
    <iframe src="url" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0">
        <p>Click <a href="url">here</a>! (Your browser does not support iframes)</p>
    </iframe>
</body>
</html>
 
Code:
<?php

// define offer urls
$offers = array();
$offers[] = "http://myfirstoffer.com";
$offers[] = "http://mysecondoffer.com";
$offers[] = "http://mythirdoffer.com";
$offers[] = "http://myfourthoffer.com";

?>
<html>
<head>
    <title>Thanks For Subscribing</title>
    <meta name="keywords" content="Page Title Here " />
    <meta name="description" content="Page Title Here " />
    
    <style>
    * {
        margin: 0;
        padding: 0;
    }
    body {
        margin: 0;
        padding: 0;
    }
    </style>
</head>

<body>
<img src="url">
    <iframe src="<?php echo $offers[array_rand($offers)]; ?>" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0">
        <p>Click <a href="url">here</a>! (Your browser does not support iframes)</p>
    </iframe>
</body>
</html>
 
Back
Top