View Single Post
Old 02-12-2005, 01:28 PM   #13 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
I am just checking the referrer to ensure that it is from the original domain. Here is the session stuff....

PHP Code:
<?
// stop search engines from getting session
$searchengines=array("MSNBot""Google""Fast""Slurp""W3C_Validator");
$is_search_engine=0;
foreach(
$searchengines as $key => $val
{
  if(
stristr("$HTTP_USER_AGENT"$val)) 
  {
    
$is_search_engine++;
  }


// if not an engine do session stuff
if($is_search_engine==&& stristr($_SERVER[HTTP_REFERER], "wristbands4awareness")) 
{
  
session_start();

  if (!
$_SESSION["rand_uid"])
  {
    
$_SESSION["rand_uid"]=rand(1,99999999999999999);
  }
}

Example:
http://www.wristbands4awareness.com/...319eacd7d7ac9f

Hit that page and then view source. At the very bottom there is some info about referrer & your rand_uid value. There shouldn't be a value for the rand_uid since the referrer is codenewbie. Hit a link on the site and then you _should_ have a uid value at the bottom...

Yea?
__________________


Urban Clothing
Admin is offline   Reply With Quote