What is the string you are actually trying to find in the REFERER field? domain.com or domain.com/index.php Urb >if((substr($_SERVER["HTTP_REFERER"],0,32) >== "http://www.domain.com/index.php")XOR (substr($_SERVER >["HTTP_REFERER"],0,28) == "http://domain.com/index.php")) > >--- In php-objects@xxxxxxxxxxxxxxx, Urb LeJeune <urb@xxxx> wrote: > > > > >if (substr($_SERVER["HTTP_REFERER"],0,31) == > > >"http://www.domain.com/index.php") { > > >} > > > > In most cases someone could enter the site without the www. > > > > Urb > > > > > > >PHP Data object relational mapping generator - http://www.meta-language.net/ >Yahoo! Groups Links > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> $4.98 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/