17
O.K. You could try this.
The modified block code checks the HTTP referer VAR to see if the page has been loaded from within your own website. If 'false' (a new visitor) the player loads. If 'true' (e.g. the visitor went to the forum, then back to the homepage) the script simply displays a bit of text. You can change the text string to "" if you want.
Important: You need to change the block type to 'PHP Script'.
$_SERVER["HTTP_REFERER"] = !isset($_SERVER["HTTP_REFERER"])? NULL : $_SERVER["HTTP_REFERER"];
$origin = $_SERVER["HTTP_REFERER"];
if ( strstr( $origin, "example.com" ) ) {
echo "Still here then" ;
}
else {
echo "
Don't forget to replace 'example.com' with your website address.
Let me know if it works, 'cos I have only tested it on my LAN.
If anyone else copies the above code, don't forget the player is set to 1 x 1 pixels to hide it.
A thread is for life. Not just for Christmas.