note 44733 deleted from function.explode by nlopess

From: Date: Sun, 15 Aug 2004 00:25:01 +0000
Subject: note 44733 deleted from function.explode by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74654@lists.php.net to get a copy of this message
Note Submitter: jake AT 4bnormal DOT com ---- I find this function incredibly useful. I used to create a function called iReferrer(). What iReferrer() does is display an 'Intelligent Referrer'. This is my code: <?php //function_defs.php function iReferrer(){ $split = explode(".", $_SERVER['HTTP_REFERRER']); echo $split[1]; } ?> <?php //other_page.php include("function_defs.php"); // other content iReferrer() ?> If the HTTP_REFERRER was 'http://www.google.com', iReferrer() would display The word 'google' as it splits the referrer using the 'dots' from the URL.

« previous php.notes (#74654) next »