Reply to Re: Filtering by referer

Your name:

Reply:


Posted by Geoff Berrow on 10/10/96 11:32

Message-ID: <437e8810$0$3765$39cecf19@news.twtelecom.net> from MEI
contained the following:

>Hi, please excuse my ignorance but I have very limited PHP knowledge.. In
>your sample script below would I include this at the top of the page I want
>to protect?? Let's say the page I want the user to go to is called
>denied.htm, where in the file would I place this??


Untested.

$validDomains = "www.mydanaher.com www.bar.com www.baz.com ";
if(stripos($_SERVER['HTTP_REFERER'],$validDomains)===false) {
header("Location: denied.htm");
exit;
//should really be full URL.
}

//do valid stuff
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация