Reply to Re: Sending people to specific pages that are coming from specific pages...

Your name:

Reply:


Posted by ZeldorBlat on 12/06/05 02:00

First of all, don't count on the HTTP_REFERER (sic) variable to be
accurate. It's up to the browser to set it, so it can always be
incorrect or not there.

Having said that, what you want is strpos():

<http://www.php.net/strpos>

Better yet, try his cousing stripos() for a case insensitive match. So
something like this:

if(stripos($_SERVER['HTTP_REFERER'], 'cominghost.com') !== false) {
//Special code goes here
}
else {
//Normal code goes here
}

Of course this isn't totally correct because
http://www.foo.com/bar/cominghost.html would be accepted. If it's
really that important, you can use a regular expression instead.

[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

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