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)
-   -   Age verification page? (https://gfy.com/showthread.php?t=774359)

CIVMatt 10-05-2007 07:12 AM

Age verification page?
 
I'm looking for a Age Verification page for a model site, but one that sets a cookie so once you pass it it doesn't come up again. I know Hammer made a nice one, however it doesn't run on a cookie system

Bro Media - BANNED FOR LIFE 10-05-2007 07:20 AM

make a page called verify.php

then make another page with a form on it say verify.html and put a form on it with a drop down list with a month/day/year that they can put their birthdate in, make sure the dropdown with the year's name is "year" so the script can check

and in verify.php put this

PHP Code:

<?php
$year 
$_POST['year'];
$age date("Y") - $year;

if(
$age <= 18)
{
setcookie("ageverification"base64_encode($_SERVER['REMOTE_ADDR'] . "-" time()), time() + (3600 24));
header("location: index.php");
exit;
}else{
header("location: verify.html");
exit;
}
?>

then on any page you want them to verify their age on, put this at the top of the page above EVERYTHING.

PHP Code:

<?php
if($_COOKIE['ageverification'] == false)
{
header("location: verify.html");
exit;
}
?>

i did this via the quick reply form, it may be buggy or whatever, its just a general idea and to help you figure out a solution

CIVMatt 10-09-2007 06:09 AM

Thank you so much Madrox!

Bro Media - BANNED FOR LIFE 10-09-2007 01:46 PM

you're welcome


All times are GMT -7. The time now is 08:37 PM.

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