(automatic backlinking for your weblog – see where your traffic is coming
from)
UPDATED: if you have a version prior to referrersUnique.v0.1.zip download the latest or simply add a fully qualified URL to your blank reflog.txt file
I’ve been wanting to get a backlink script working for Geeklog for a while,
seems like they’ve become quite popular in weblog circles. There is a
Perl version that many people
seem to be using, so I took a crack at converting it to PHP but it’s a bit longwinded. Naturally PHP has many
built-in functions that make this kind of thing a lot easier than Perl 😉
To view an example of the referrer PHP Block check out http://www.phpkitchen.com/ , it’s on the left side under the Amazon block. The source code is available
here. I started off
Charles F. Johnson’s code from http://littlegreenfootballs.com which really
is very good then modified it to display unique referrers.
August 14th, 2002 at 5:33 am
I\’m sure it\’s a great block, but it doesn\’t work for me as I get these errors:
Warning: Wrong datatype in array_unique() call in /home/finiserv/public_html/thane/system/lib-custom.php on line 206
Warning: Invalid argument supplied for foreach() in /home/finiserv/public_html/thane/system/lib-custom.php on line 208
Warning: Invalid argument supplied for foreach() in /home/finiserv/public_html/thane/system/lib-custom.php on line 214
Hmm?
August 14th, 2002 at 7:52 am
that is bad indeed! I have it working in PHP 4.06 and 4.1.3 – what version are you using? Sounds like it might need type casting.
August 14th, 2002 at 9:30 am
It was a simple error, the reflog.txt cannot be empty – simply insert at least one fully qualified URL in the blank file and the block will work fine. Or download the updated source at http://www.phpkitchen.com/docs/referrersUnique.v0.1.zip
August 14th, 2002 at 11:13 am
Superb block – I love it 🙂
—
Alan
alan@goddammit.co.uk
August 14th, 2002 at 3:39 pm
Using 4.2.2
August 17th, 2002 at 9:50 pm
Warning: Cannot add header information – headers already sent by (output started at /www/geeklog/geeklog/system/lib-custom.php:77) in /www/geeklog/geeklog/system/lib-sessions.php on line 150
Warning: Cannot add header information – headers already sent by (output started at /www/geeklog/geeklog/system/lib-custom.php:77) in /www/geeklog/geeklog/system/lib-sessions.php on line 162
*** but my referrers did manage to appear (as in reflog.txt).. except for this errors that pops up right on top of the page.
Using PHP 4.1.2
August 17th, 2002 at 9:56 pm
new error
Warning: Cannot add header information – headers already sent by (output started at /www/geeklog/geeklog/system/lib-custom.php:77) in /www/geeklog/geeklog/system/lib-sessions.php on line 263
August 19th, 2002 at 10:46 pm
Great block! How did you get it to sort by hits per domain?
August 20th, 2002 at 9:28 am
as recently posted on the geeklog article, i will be releasing the next version shortly that will have a few more features including sorting.
August 21st, 2002 at 6:49 pm
sounds good, thnx. do you have a release date in mind?
November 10th, 2002 at 6:19 am
followed instructions to a t many times…keep getting this error…
Fatal error: Failed opening required \’/home/calvaryc/lgf-reflog.php\’ (include_path=\’\’) in /home/calvaryc/system/lib-custom.php on line 596
November 10th, 2002 at 4:55 pm
this error message is telling your that file \’lgf-reflog.php\’ doesn\’t exist in your web root or that apache doesn\’t have read permissions on the file. First verify that the file exists in the correct place, your web root is the dir where geeklog\’s config.php exists, then check the file\’s permissions. If you\’re have command line access to your server something like
chown yourUsername lgf-reflog.php
will do the trick.
January 10th, 2003 at 11:29 am
I modifed your code to work with sites that do not have the Geek-log installed. Works pretty good. Can see it at http://cybernetec.com on the bottom right of the page. Whos permission do i have to get to post the modified version on our site for download? I know the modifications i did are not hard to do. But for most it is something they would not want to attempt.
Scott R