this is interesting! ..but, useless until you don’t share your code 🙂 🙂 🙂 🙂
I’ve had one up for a while too, based on the ncyoung refererLib package. Code’s here:
http://www.ben-johnson.org/blog/refererLib.new.phps
It also includes a function that’ll keep track of who comes to your page via Google and displays the query strings they use to get there.
The code on there is a little outdated – I’m migrating over to the current CVS version this weekend, and I’ll be uploading a new copy with the following fixes:
* Now uses WP’s database connections, so you don’t need to plug in your username, password, etc.
* Code cleaned up
Since we’ve got Smarty templates in CVS now, I’ll get it turned into a plugin at some point soon.
Thread Starter
gregz
(@gregz)
this script I used can be found on http://jakez.net but I am going to have a good look at bdjohns script now.. looks better to me…
Gregz
Ok, I’ve uploaded the version with the updates decribed above. PHP source is now located at:
http://www.ben-johnson.org/blog/refererLib.phps
Enjoy, and let me know if you have any bug reports.
(note – the database getting huge if you get thousands of hits a day is a feature, not a bug 🙂 )
I copied the code and saved it as refererLib.php. Can someone tell me what code I would have to put elsewhere to have the referrers show up on my page?
I’m looking to have something like “Last 5 Referrers” and then a list, but since I don’t know php, I don’t know what to put on my page to have it show up. Would it be include (refererLib.php)? and then the list would show?
Thanks very much.
I get no output ;_;
I have uploaded the referrerlib as referrers-include.php, and in referrers.php:
<pre><?php
$list = topRefererList(5,”global”);
foreach ($list as $link){
print “
Anonymous
ben: your installation instructions may be great for php geeks, but for those of us with lesser skills they are difficultto follow. I think there are steps you take for granted. My suggestion would be to try to write your instructions so a 12 year old could follow them.