Hello,
I need splash/gateway page with a adult content warning for an escort agency. I think this solution would fit this need: http://www.webhostingtalk.com/showthread.php?t=900972 but I don't know how to implement it on CMSMS.
Appreciate if someone could give me some light on this.
Many thanks
Paulo
Adult content warning splash/gateway page solution
Re: Adult content warning splash/gateway page solution
I would copy the PHP code into UDTs and call the 1st in the template and the page metadata for the 2nd (not the HTML from 2nd), not tested and it needs changes to correct settings/paths...
Code: Select all
//Check user agent
$r_explorer=$_SERVER['HTTP_USER_AGENT'];
if ( (substr_count($r_explorer,'bot')==0) and (substr_count($r_explorer,'yahoo')==0) and ($_COOKIE['warning1']!=21) ) {
include 'warning-page.php';
}
Code: Select all
//Lets Set the cookie
if ($_GET['myage']=="I-Am-Older-Than-18") {
$page1=$_GET['page1'];
setcookie("warning1",21,time()+7200);
header('Location:'.urldecode($page1)) or die('<a href="'.urldecode($page1).'"></a>');
}