You are here: Re: Reg expression to get referer's domain? « PHP Programming Language « IT news, forums, messages
Re: Reg expression to get referer's domain?

Posted by gosha bine on 07/10/07 10:20

On 09.07.2007 21:29 laredotornado@zipmail.com wrote:
> Hi,
>
> I'm using PHP 4.4.4. What is the best way (I assume regular
> expressions would be involved) to get the domain from the
> $_SERVER['HTTP_REFERER'] variable? By "domain" I am referring to (for
> example), google.com, instead of groups.google.com. In other words, I
> don't care about sub-domains.
>
> Thanks, - Dave
>

perhaps

'~[\w-]+\.\w+(?=/|$)~'



--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

 

Navigation:

[Reply to this 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

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