Thread: PHP question
View Single Post
Old 02-22-2004, 09:59 PM  
grannytgp
Confirmed User
 
Join Date: Aug 2002
Posts: 269
PHP question

Looking for feedback on this one... I basically send the majority of my traffic to my own custom tour, and then link the join links to the best sponsor of the week that allows direct JOIN page linking.

So for awhile now I've been using a simple PHP page for my index, rotating between the three versions of my main tour. The very simple code for the index page has been this:

PHP Code:
<?php
$rand 
rand(1,3);
include(
"page$rand.html");
?>
And then I simply had my three tour pages named page1.html - page2.html - page3.html

So now I'm thinking I want to start incorporating some sponsor pages directly into this rotation as well. So I'm trying to think of the best way to do it, and the one thing that comes to mind is the old invisible frames trick. Something like this:

PHP Code:
<HTML>
hahahahahaha>
<title>TEST PAGE</title>
</head>

<frameset rows="100%,*" scrolling=no border=0 frameborder=no framespacing=0>

<?php

// seed with microseconds
function make_seed()
{
   list(
$usec$sec) = explode(' 'microtime());
   return (float) 
$sec + ((float) $usec 100000);
}
srand(make_seed());

$rand = array('http://www.mycustomtourURL.com','http://www.sponsorURL.com');
shuffle($rand); $rand $rand[0];


print 
"<frame src=\"$rand\" scolling=auto border=\"0\" frameborder=\"0\">";

?>

</frameset>
</html>
Now I've tested this out, and it does work - the page comes fully into view within the frame and looks fine. But the only question I have is -- will I have an issue when it comes to the surfer clicking the JOIN links from within the frame? I know IE's security settings might kick in, and of course I want to make sure I'm getting credit for sales generated.

Any suggestions on this one? Or possibly suggest an alternate method of rotating among my local tour pages and outside sponsor URL's?
__________________
No sig = good sig
grannytgp is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote