DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 18, 2017, 01:27:05 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: getting my site out of referers  (Read 2047 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: April 28, 2004, 08:35:46 PM »

some players are using the url without the "www" and every page they go to is coming up under referrals.  

first off, maybe a suggestion to Ken, support for multiple sites to be listed, because i have a few different domain names, just people only play the game on 1.

perhaps there is something i can do outside of the game, .htaccess maybe?
Logged

lonnyl
Guest
« Reply #1 on: April 29, 2004, 04:38:47 AM »

I had a similar problem....

in common.php find
   $site = substr($site,0,strpos($site,"/"));

now note the first line and last bracket....
in the first line make sure you change yourip to your ip....
the rest of the code is the original... I just included if here so you could see where the line and bracket should be placed....
   if (strstr($site, $_SERVER['SERVER_NAME']) =="" and (strstr($site,"yourip") =="")){
   if ($row['refererid']>""){
      $sql = "UPDATE referers SET count=count+1,last=now(),site='".addslashes($site)."' WHERE refererid='{$row['refererid']}'";
   }else{
      $sql = "INSERT INTO referers (uri,count,last,site) VALUES ('{$_SERVER['HTTP_REFERER']}',1,now(),'".addslashes($site)."')";
   }
   db_query($sql);
}

Even with this I still empty my reffers table about once a week as it still seems to get rather large.... but this will trim out all hits from within your site....
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
41 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search