3.142.98.108 |    

Navigation

Google Advertisement

referer
  1. // Liste mit gueltigen Domains...
  2. $referers=array('www.phpXpress.de', 'www.m-newdesign.de', 'meine-awo.de');
  3.  
  4. // checken of Referer gueltig ist...
  5. if ( referer($_SERVER['HTTP_REFERER']) ) echo "good"; else echo "bad";
  6.  
  7. // *****************************************************************
  8. // Referer checken...
  9.  
  10. function referer($referer) {
  11. global $referers;
  12. if (!empty($referer)) {
  13. 	foreach ($referers as $host) {
  14. 		if ( preg_match("/https?:\/\/([^\/]*)$host/i", $referer) ) { return 1; break; }
  15. 	}
  16. } else return 1;
  17. return 0;
  18. }
Parsed in 0.008 seconds at 69.81 KB/s

Search
 
Full text search by name and content of a snippet.

User online
There are 3 users online.

Tags Cloud

Latest snippets
str2seconds
(Bash::Function)
is_integer
(Bash::Function)
file_rotate
(Bash::Function)
confirm
(Bash::Function)
is_workingtime
(Bash::Function)
last day of last month
(Bash::Snippets)
crypt_apr1_md5
(PHP::Function)
crypt_apr1_md5
(Perl::Function)
transparent
(CSS)
rfc2822Toiso8601
(PHP::Function)