Okay, I hope this is in the right forum.
I want to use this script (http://scripts.inexistent.org/refericious/) to track my referrers, but I need to include this piece of code at the top of all pages (or in a header file):
<?php if(basename($_SERVER['SCRIPT_FILENAME']) != 'referrers.php'){ include('dir/referrers.php'); } ?>
Where can I put this? I have tried putting it in a couple places but I get sql errors or something, I'm obviously going about it wrong. Help me?
You can't include a script that modifies the headers or messes with the database connection. As suggested in the docs, you could use the custom_header for inclusion of PHP scripts in cpg1.4.x. In cpg1.3.x, there are other methods in cpg1.3.x that enable you toinclude scripts (you need to add the include to the pageheader function). However, you can't include all sort of scripts. What you're up to won't work, sorry.
Oh, okay :/
Thanks.