Help with finding a script

Discussion in 'Programming' started by hmilesjr, Dec 7, 2006.

  1. #1
    I am trying to locate a script that I can install that when someone clicks on a link on my site, an ad page will display before loading the original clicked to page. Much the same way Paypal does when someone logs into their site.

    Any help would be appreciated.
     
    hmilesjr, Dec 7, 2006 IP
  2. drig

    drig Peon

    Messages:
    4,188
    Likes Received:
    175
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hm, I remember seeing something for that, but I cant remember it anymore. Why wont just a standard html page work with a timed redirect?
     
    drig, Dec 7, 2006 IP
  3. hmilesjr

    hmilesjr Active Member

    Messages:
    747
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I use RSS for the article links. I would like the links to appear as they should for indexing purposes and overall site quality. I would like to taylor the script so that a user only sees the ad once a day. I don't want to scare users off.
     
    hmilesjr, Dec 7, 2006 IP
  4. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #4
    You can simply use java scripts

    I know a Javascript that allows when users click on a link they will be redirected to sponsor page

    Download Acehtml software you have a lot of javascripts inbuilt with the software
     
    Freewebspace, Dec 7, 2006 IP
  5. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #5
    One of two ways I can think of are : when the user logs into your site, instead of redirecting them to index.php redirect them to sponsor.php with the following :
    
    <?
    if($_COOKIE['GotAds'])
    {
    	header("location: index.php"); # User has seen advertisements	
    }
    ?>
    <!-- ADVERTISEMENT HTML -->
    
    <!-- END ADVERTISEMENT HTML -->
    <?
    setcookie("GotAds", true, time()+86400);
    ?>
    
    PHP:
    If the user has seen the ads in the last 24 hours they'll be redirected to index.php, alternatively if you don't have control over the login process so much you could keep the above code in sponsor.php and add the following to the top of the page the user is sent to onlogin :

    
    <?
    	if(!$_COOKIE['GotAds'])
    	{
    		header("location: sponsor.php");
    		exit;
    	}
    ?>
    
    PHP:
    Good luck :)
     
    krakjoe, Dec 8, 2006 IP
    drig likes this.