1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adult warning page how to build a script? help?

Discussion in 'HTML & Website Design' started by brathamike, Apr 5, 2008.

  1. #1
    Hello. I am sure most of you guys have seen a page were it says you must be 18 and older to view the contect of the site. I was wondering if you guys can help me make a page like that. Can you post a code please

    thanks
    mike
     
    brathamike, Apr 5, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could always do something like this...

    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    	<title>
    		YourWebsite.com | You must be over 18 to view the site
    	</title>
    	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    	<style type="text/css">
    		*
    		{
    		padding: 0;
    		margin: 0;
    		}
    	</style>
    </head>
    <body>
    	<h1> 
    		Your Website.com
    	</h1>
    	<p>
    		Thank you for visiting yourwebsite.com. You however have to be over 18 to view the content of the site...
    	</p>
    	<form action="http://www.yourwebsite.com/allow.html">
    		<fieldset>
    		<legend> Over </legend>
    			<input type="submit" value="I am over 18">
    		</fieldset>
    	</form>
    	<form action="http://www.goole.com">
    		<fieldset>
    			<legend> Under </legend>
    			<input type="submit" value="I am under 18">
    		</fieldset>
    	</form>
    </body>
    </html>
    
    HTML:
     
    nicangeli, Apr 6, 2008 IP
  3. brathamike

    brathamike Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hello were do i put that code at ???

    thanks for the code but i dont know were to put the code

    mike
     
    brathamike, Apr 6, 2008 IP
  4. brathamike

    brathamike Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What im trying to do is, if someone comes to my site they have to go through a warning entrance page. The code you gave me is perfect i can modify from there but how do i make it come up when someone enters my site? Does anyone know how to do this

    please help

    thanks
    mike
     
    brathamike, Apr 6, 2008 IP
  5. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well the simplest way to do it is to create a file called, index.html then put the code in that I gave you. Anytime somebody visits your domain then they will be shown this file. If you then create a folder called "allow" you can move all of you site's files into that folder, and alter my code where I typed http://www.yourwebsite.com/allow.html change that to, http://www.yourwebsite.com/allow

    This will only work if somebody visits the domain directly, I.E. it will not work if they visit, yourdomain.com/thispage.html. If you need that to work aswell I believe that you will have to use a server side scripting language such as PHP, that's much harder.
     
    nicangeli, Apr 6, 2008 IP
  6. brathamike

    brathamike Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    hi sir thanks for your time. Yes I see what your saying. So it looks luke I'm going to need the php version that u mentioned. Do you know how to code the
    Php version? I'm willing to pay for your time? If you don't do you know anyone that can do this? I would like the whole entire site locked. And only way to enter would be through the entrance.

    Thanks
    mike
     
    brathamike, Apr 6, 2008 IP
  7. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You need to be careful with this sort of thing as do it wrong and spiders wont be able to index your page because they keep getting bumped back to the first page or as with the above example code they are unable to "press" a button.
     
    AstarothSolutions, Apr 7, 2008 IP
  8. samazgor

    samazgor Notable Member

    Messages:
    173
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    230
    #8
    samazgor, Oct 26, 2015 IP