rstewar Posted February 14, 2010 Share Posted February 14, 2010 Hi, I have a site that is alcohol related and by law i must have a page where visitors verify if they are of age. I have a very simple code snippet at the top of each page that checks if the visitor is verified. <?php //Start the session session_start(); /* * If they haven't passed the age test * then the age_verified session will not * be set, since it is only set if they * say they are 21 years of age. */ if(!isset($_SESSION['age_verified'])) { header("Location: verify.php"); exit; } ?> Is is possible to allow search engines such as Google, Yahoo, Bing, etc. to access these pages and index them? Maybe by verifying the user agent or something? Link to comment https://forums.phpfreaks.com/topic/192059-allow-search-engines-to-access-protected-webpages/ Share on other sites More sharing options...
bogdaniel Posted February 14, 2010 Share Posted February 14, 2010 Hi, I have a site that is alcohol related and by law i must have a page where visitors verify if they are of age. I have a very simple code snippet at the top of each page that checks if the visitor is verified. <?php //Start the session session_start(); /* * If they haven't passed the age test * then the age_verified session will not * be set, since it is only set if they * say they are 21 years of age. */ if(!isset($_SESSION['age_verified'])) { header("Location: verify.php"); exit; } ?> Is is possible to allow search engines such as Google, Yahoo, Bing, etc. to access these pages and index them? Maybe by verifying the user agent or something? i`m not sure if you talk only stupid things but this you could achieve creating an array with the user agent of the bots(i think you can find on google about them) but for someone smart and with firefox could enter on your website by changing the user agent. click check this out for more information's. Link to comment https://forums.phpfreaks.com/topic/192059-allow-search-engines-to-access-protected-webpages/#findComment-1012289 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.