Unstoppable Domains โ€” Expired Auctions

Show a page to a visitor once...

Spacemail by SpaceshipSpacemail by Spaceship
Watch
Impact
13
I would like to create a intro page to one of my websites. It will just be for example a image welcoming them to the site.

Just wanted to knwo would it be possible to only show this page once per user(IP) per 24 hours and if they do hit that page again to automatically forward them to the main site?

Thanks,

Darren
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Yes, this is possible.

before the head of your document you will need to put in something like:
PHP:
<?php 
$ip = $_SERVER['REMOTE_ADDR'];
[[your $db statement here to see if the ip is in your database, if it is get the time it was entered.]]

if ([time < 24 hours]) 
{
  header("location: http://www.hobnobdesign.com");
} 
else
{
  if ([$ip is not in the database])
  {
     [Insert ip and time into database]
  }
  else
  {
     [Update the time for that ip to now]
  }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<Your intro page html code here>
</body>
</html>


I'm sure there are diffrent ways, but this is the way I would use. Hope it helps you.
 
0
•••
Appraise.net
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back