Changeset 460 for trunk/includes/global_function.php
- Timestamp:
- Apr 13, 2010, 5:22:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r455 r460 536 536 } 537 537 538 function LogReferal() 539 { 540 global $System; 541 542 if(array_key_exists('HTTP_REFERER', $_SERVER)) $Referer = addslashes($_SERVER['HTTP_REFERER']); 543 else $Referer = ''; 544 $Referer = substr($Referer, strpos($Referer, '/') + 2); 545 $HostName = substr($Referer, 0, strpos($Referer, '/')); 546 if(substr($HostName, -1) == '.') $HostName = substr($HostName, 0, -1); 547 //if($HostName != gethostbyname($HostName)) 548 { 549 $Referer = 'http://'.$HostName.'/'; 550 $System->Database->query('REPLACE INTO `Referal` (`Web`, `DateFirst`, `DateLast`, `LastURL`) VALUES ("'.$Referer.'", NOW(), NOW( ), "'.addslashes($_SERVER['HTTP_REFERER']).'")'); 551 } 552 } 553 538 554 ?>
Note:
See TracChangeset
for help on using the changeset viewer.