TV202 Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download
Before Posting, Have You Read the FAQ? And Have You Searched? If Not Please Do!

Attn: The 202 Support Forum will now be revised
Within the next few weeks the Tracking202 Support Forum will be revised. Some threads will be shut down or reorganized. New rules will be put in place to accommodate those who need help. The 202 team wants to make the forum a more user friendly place for new and old affiliates. We want to make this forum a place for affiliates to help each other be successful.

iframes and rotating multiple offers

Post new topic Reply to topic Prosper202 Forum Index » Tracking202 Pro General Discussions
New Posts Search Forum
Author Message
mortenn
Website Skype AIM


Joined: Feb 24th, 2009
Posts: 1

Post Posted: Oct 28th, 2009 at 5:29pm Post subject: iframes and rotating multiple offers Reply with quote

Hi,

I use Iframes and want to rotate different CPA offers.

I have created a redirect using the second method with a seperate redirect php file.

Then I have included this script. Will this work? Will all subid's be parsed correctly?

<?php

$offer[1] = 'http://www.affiliate_url_1&subid=';

$offer[2] = 'http://www.affiliate_url_2&subid=';

$offer[3] = 'http://www.affiliate_url_3&subid=';

//this is the text file, which will be stored in the same directory as this file,

//count.txt needs to be CHMOD to 777, full privlledges, to read and write to it.

$myFile = "count.txt";

//open the txt file

$fh = @fopen($myFile, 'r');

$offerNumber = @fread($fh, 5);

@fclose($fh);

//see which landing page is next in line to be shown.

if ($offerNumber >= count($offer)) {

$offerNumber = 1;

} else {

$offerNumber = $offerNumber + 1;

}

//write to the txt file.

$fh = fopen($myFile, 'w') or die("can't open file");

$stringData = $offerNumber . "\n";

fwrite($fh, $stringData);

fclose($fh);

//redirect to the affilate url, + add the subid at the end

header('location: ' .$offer[$offerNumber] . $_COOKIE['t202proSubid']);

?>

Thanks!

Morten.

Back to top
Post new topic Reply to topic Page 1 of 1

Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.