Adult content warning splash/gateway page solution

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
User avatar
pgingao
Forum Members
Forum Members
Posts: 70
Joined: Mon Sep 03, 2007 8:02 am

Adult content warning splash/gateway page solution

Post by pgingao »

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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Adult content warning splash/gateway page solution

Post by Dr.CSS »

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>');
}
Post Reply

Return to “The Lounge”