I have a simple, but effective Top Referers list on my website, LiquidNav.com. (at bottom of left column, hold your mouse pointer over any of the links in the box.) The script is written in PHP and uses no client side scripting. The original script is here, as you can see, I have modified it a little.)
(This is the best "bookmark" program that I have found so far, but lacks a lot of features... Anyone know of something better than this one?)
The script is rather simple in that it automatically adds a site to the list when a link is added to my site from another domain name and someone clicks on it. It then ranks referring web sites based on how much traffic they send from that domain name, effectively putting low hit referrers at the bottom of the list and "bumping off" sites that don't send traffic or enough traffic to remain in the list. I love it because it's all automated and I never have to mess with it.
The script works great, except I would like to enable a webmaster to somehow alter the way the link to their site is displayed somehow. I can't seem to figure out how to do this without creating some form of signup/link swapping script, which is what I am trying to avoid. I hate having to sign up to swap links. Because it is VERY time consuming and the place where you sign up may not even send you any traffic or they might remove your site because they don't like it for some reason.
Example: someone posts their bookmark file or favorites list and starts sending traffic to the sites in the bookmark list. Usually, there would be no reciprical link trading between the poster of the bookmark file and the websites that are in it.
I just had a cool idea!!!
I was using this referrers script to eliminate the need for a signup form but couldn't figure out how to give a webmaster the ability to modify the way their site was listed with the script.
This will allow a webmaster to specify the same information that they would enter into a signup form, however they only have to do it ONCE!
Here's my idea...
Place a file called "websiteinfo.xml" in the root directory (same place as a robots.txt file) that contains the info. The referers script can then be told to read this file and modify it's settings for that site accordingly. For compatibility, the file can even be written in XML.
Example: (Tell me what you think)
xml=<?xml version="1.0"?>
<WebSiteInfoService>
<SiteName>
LiquidNav
</SiteName>
<SendHitsHere>
http://LiquidNav.com/
</SendHitsHere>
<Optional>
<COPPA>
Adult (21+)
Adult (18+)
13 and up
Under 13
</COPPA>
<SiteURL>
http://LiquidNav.com/
</SiteURL>
<SiteDescriptrion>
This site is really cool, etc., etc., etc.
</SiteDescriptrion>
<SiteKeywords>
bookmark list, bookmarks, free personal bookmark database, etc.
</SiteKeywords>
<SiteType>
General (or whatever)
</SiteType>
<WebmasterName>
</WebmasterName>
<WebmasterEmail>
links@LiquidNav.com
</WebmasterEmail>
</Optional>
</WebSiteInfoService>
This XML is released under the GPL licence (http://www.gnu.org/copyleft/gpl.html) because I don't want some greedy bastard getting rich off of my idea.
I would like to add the ability of checking for reciprical links so that someone isn't just faking hits to the script in order to have their site listed.
My only problem with this is that I am only a novice PHP coder. I haven't a clue of how to parse this XML file and translate the contents into something useful for the script.
Here's some code posted by someone else for the recip link checking:
<?php
$webpage = "http://www.theirdomain.com";
$fp = fopen($webpage,"r");
$page ="";
while (!feof($fp))
$page .= fgets($fp,1000);
fclose($fp);
// Now all HTML page is in $page
$page = strtolower($page);//make lowercase for easier manipulation
//clear comments so they can't cheat
while (strstr($page,"<!--")){
$opentag = strpos($page,"<!--");
$newpage = substr($page,0,$opentag);
$closetag = strpos($page,"-->")+3;
$newpage .= substr($page,$closetag);
$page = $newpage;
$newpage = "";
}//while comments
$q = (strpos($page,"http://www.mydomain.com"));
echo $q;
?>
here's the script in action with a few tweaks. again, it's not complete:
http://www.orthographics.com/checklink.php