View Full Version : Top Referrer's Script
MediaHustler
Dec 7th 2006, 3:18 am
Hi I am looking for a script similar to the one on this site.
http://www.jarkey.net/hotlinks.html
It tracks all links referring to the site and tallies them and the highest referrer is shown.
Does anyone know where I can find something similar? Preferably for free?
Please note I do not want the Top Sites scripts, just Top Referrers for my links page.
krakjoe
Dec 7th 2006, 3:40 am
I can put something simple together for you, just add the code to existing pages instead of making seperate one, if that's okay ? or you want something seperate ?
MediaHustler
Dec 7th 2006, 3:48 am
I can put something simple together for you, just add the code to existing pages instead of making seperate one, if that's okay ? or you want something seperate ?
Sure i'll give it a look.
MediaHustler
Dec 7th 2006, 3:52 am
Like I want it to be able to get a hit on any of my pages and it tracks it down and tallies it at my links.php page.
So like if one of my pages gets a hit from a site I want it to be tracked from the hit from that page and a referral site added to links.php
you know what I mean?
CodyRo
Dec 7th 2006, 3:55 am
He'll most likely include a seperate PHP script where you can just use include() (http://www.php.net/include) on the top of each page to track for referrals.
MediaHustler
Dec 7th 2006, 3:56 am
He'll most likely include a seperate PHP script where you can just use include() (http://www.php.net/include) on the top of each page to track for referrals.
Oh ok, gotcha.
krakjoe
Dec 7th 2006, 3:59 am
Yeah, hes right, I'll do that, so shall I do that ? can u pm me the css that'll be attached to the page please ? n whatever else you think I might wanna know....
MediaHustler
Dec 7th 2006, 5:44 am
Does anyone have a free script of this while krakjoe makes a version?
krakjoe
Dec 7th 2006, 12:30 pm
i'm done : demo / download = krakjoe.info
The readme inside contains :
xTracker © J Watkins 2006
Setup :
Login to cpanel ( or other management softare ), create a mysql database, and grant a user access.
open up xReferrer-settings.php and fill in the appropriate values.
Create a directory under your webroot, so that xReferrer files are in a folder by themselves
* NOTE : For the rest of these instructions, this directory will be referred to as "install" *
Upload xReferrer-class.php, xReferrer-settings.php, and xReferrer-setup.php to your server
Visit, hxxp://yourdomain.com/install/xReferrer-setup.php
When complete, you may delete the setup file, it'll only work once anyway.
Usage :
To track a page for referrers, do the following right at the top of the script :
<?
@include("install/xReferrer-class.php");
$xRf = &new xReferrer("tracker");
?>
This will include the class ( assuming you have the path correct ) and initiate a tracker.
To show referrers stats, do the following inside the html element where you wish to display results :
<?
@include("install/xReferrer-class.php");
$xRf = &new xReferrer("output", 20);
?>
This will show the top 20 referring domains to your site, along with the last referral time
Styling the table :
<th> tags are class="xRefTH"
<td> tags are class="xRefTD"
<table> tag is class="xRefTABLE"
Heading tag is class="xRefTITLE"
So update your css to include me :)
* NOTE : Make sure you have read this text thoroughly before you attempt to contact me *
Have fun :)
MediaHustler
Dec 7th 2006, 6:22 pm
i'm done : demo / download = krakjoe.info
The readme inside contains :
Dude. Krakjoe.
You know I love you right?
Juls
Dec 7th 2006, 9:29 pm
nice ;-) hope it is good.
give the man some green.
MediaHustler
Dec 7th 2006, 9:37 pm
nice ;-) hope it is good.
give the man some green.
Works like a charm.
http://gamefrat.com/referrer.php
krakjoe
Dec 8th 2006, 12:27 am
Looking good man......always a pleasure.....
TromS
Dec 8th 2006, 3:59 pm
Looks like a great script, but is there any way to block URL's from showing?
Don't want to have search engines on that list...
MediaHustler
Dec 8th 2006, 11:14 pm
Looks like a great script, but is there any way to block URL's from showing?
Don't want to have search engines on that list...
Yes there is.
Open up xReferrer-class.php in your page editor and do a search for the following line.
if( $xReferrer != "" && $xReferrer != $_SERVER['HTTP_HOST']
and replace it with this line, for instance I will block www.google.com
if( $xReferrer != "" && $xReferrer != $_SERVER['HTTP_HOST'] && $xReferrer != "www.google.com"
All you have to do is keep adding
&& $xReferrer != "www.anothersite.com"
to block another site.
Hope this helps.
krakjoe
Dec 9th 2006, 2:21 am
Look at you giving php advice already, good for you man, well done .... :)
MediaHustler
Dec 9th 2006, 3:48 am
Look at you giving php advice already, good for you man, well done .... :)
:D
I still suck.
TromS
Dec 9th 2006, 4:06 am
Thanks. I'll try this on my site :)
You can see from the links on jarkey.net, that they are using http://www.trackyourstats.com/
krakjoe
Dec 9th 2006, 4:39 am
Mines better, coz I'm better and I'm not asking you for an email address to trash ....which you know they're gonna do, how else will they make money
MediaHustler
Dec 9th 2006, 5:14 am
Mines better, coz I'm better and I'm not asking you for an email address to trash ....which you know they're gonna do, how else will they make money
Master Sensei has spoken.
TromS
Dec 9th 2006, 5:22 am
Is there any way I can split the script?
See on jarkley.net, they have a list of links on their left menu with 30 links, and then you can click on "more" to get the full list.
I tried having two "xReferrer-class.php" files, but I couldn't get it to work..
Still a great script :rolleyes:
krakjoe
Dec 9th 2006, 5:26 am
Well, I was asked to write a "top referrers" script, and that's what I did, I spose you could add the class to page by itself and adjust the number to a number that will never be reached to spit all the referers ever.....
TromS
Dec 9th 2006, 6:00 am
What I tried to do, was to have a simple list of links on the frontpage - like the list on jarkley.net that has about 30 links.
I edited "xReferrer-class.php" to only show "hosts".
Then I added a link to another page (ex: links.php), who would show more links + hits in (reading from "xReferrer-class2.php").
I used this code for the frontpage:
<?
@include("install/xReferrer-class.php");
$xRf = &new xReferrer("output", 10);
?>
And this for the links page:
<?
@include("install/xReferrer-class2.php");
$xRf = &new xReferrer("output", 10);
?>
But I couldn't get it to work; the list and the links page still showed the same (host+hits+last hit).
Can you please help me with this?
krakjoe
Dec 9th 2006, 2:12 pm
<?
@include("install/xReferrer-class2.php");
$xRf = &new xReferrer("output", 10);
?>
is uneccesary, the number is the number you're selecting from the database, so if you put 10 there, you'll get 10 results, if you put 100 you'll get 100 results
TromS
Dec 9th 2006, 3:18 pm
Yes, I understood that.
But I wanted one page to show _just_ the link, and the other to show the link + hits in + last hit in.
Frontpage: A box in the left menu will show the top referers, but the links only
Links page: Shows top links, amount of hits in and time for the last hit in.
Understand what I mean?
krakjoe
Dec 9th 2006, 3:22 pm
yeah, you'll need to edit the html, but either way, it's still going to spit all links upto the number included in the class initiation....
FYI Evry1 : Ported to work with wp, and packaged as a plugin :
http://krakjoe.info as always
demo : http://krakjoe.info/wp
fakestar
Jan 11th 2007, 3:28 am
Very nice script.
Is it possible filter URL by keywords?
for example, i don't want visit coming from domain containing healthinsurance.
how can i do this?
Thanks!
krakjoe
Jan 11th 2007, 3:49 am
I dunno, haven't thought about it, it'd mean collecting data from all different search engines about how thier queries are formatted, if someone does that I'll do the rest ...
phantom
Jan 27th 2007, 4:29 pm
Cool script Im looking for something similar that would also show hits out....maybe on mouseover???
krakjoe
Feb 6th 2007, 9:53 am
If you get in touch with me on msn, I can spend an hour or two making it do what you want it to .....
phantom
Feb 6th 2007, 9:58 am
Krakjoe,
Thanks for the offer....I don't use MSN though only google talk. Basically I'm trying find one that works the same way as the one in my arcade Ninjaplayer.com (http://Ninjaplayer.com) which running off of phparcadescript.
krakjoe
Feb 6th 2007, 10:03 am
I could make something to work with that also, I'll pm you when I have google talk installed and got a couple of hours to spare ....
phantom
Feb 6th 2007, 10:30 am
krakjoe: Not sure if I was clear or not but I don't need it to work with the arcade. I am looking for something like this that can be used standalone or inserted where I need it with say in a php include so I could use it on any project.
Also how much is this going to cost me? :) I would hate to make you work for a couple hours on this. Maybe you can make this a finished product then offer it for sale?
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.