GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP question (https://gfy.com/showthread.php?t=240867)

grannytgp 02-22-2004 09:59 PM

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?

Ash@phpFX 02-22-2004 10:13 PM

if it works dont change it :2 cents:

grannytgp 02-22-2004 10:19 PM

One addition to this one... I've also tried out the following:

PHP Code:

<?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.google.com','http://www.yahoo.com'); 
shuffle($rand); $rand $rand[0]; 
include(
"$rand"); 
?>

Now this does work, but there are two issues with it --

1. Images are basically hotlinked, because the page appears to be loading directly off your server.
2. If the page is coded with local URL links like such: a href="join.html" --- then IE automatically appends your own URL to that link. So that's a no-no...

Just wanted to pass this along to anyone that might have suggestions.

grannytgp 02-22-2004 10:23 PM

Quote:

Originally posted by asher
if it works dont change it :2 cents:
Well it works in bringing the outside domain pages into view within the frame - that much is true. But... I'm not 100% sure that when a surfer clicks the JOIN link, if he will have a problem with IE security.

Because of course that join link is going to direct them to a secure join page. And being loaded inside of a frame will either block the cookie which tracks that sale, or just plain screw up the pending sale because of the secure page being inside of the frame.

Azathoth 02-22-2004 11:05 PM

Never heard of array_rand function?

- Az


All times are GMT -7. The time now is 04:08 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123