Waxy Backlinks v0.05

A couple new improvements to the Waxy Backlinks script. It can now be called from PHP scripts, referrers from some search engines are now excluded by default, and you can set the maximum number of backlinks to display and the minimum threshold of hits before a link gets displayed. Any of these options can easily be changed in the script itself. Many thanks to Joe Utsler and Ben Trott for bug reports. Download Waxy Backlinks v0.05 now! (Installation and configuration details inside.)


To install, you can use the same procedure as before.

To set the maximum number of links to display, change $max_links (default is 10). To change the minimum number of hits before a backlink is displayed, change $min_hits (default is 0, showing all backlinks). And if you want search engine backlinks to display, remove the domains from the @blacklist.

If backlink.cgi is being called from a PHP script:

1. Edit the script, and change $php equal to 1.

2. In your PHP script(s), insert the following line where you want the backlinks to be displayed (change the path to point to backlink.cgi):

<? echo `perl /path/to/cgi/backlink.cgi “$HTTP_HOST” “$SCRIPT_NAME” “$HTTP_REFERER”`; ?>

E-mail any questions or suggestions about it to me, or ask right here. If you want an older version, they’re still available (0.04, 0.03).

28 thoughts on “Waxy Backlinks v0.05

  1. Hi– great script. Working fine over at my site now. I would recommend one change:

    Place the parameters to the CGI in double-quotes:

    <? echo `perl /path/to/cgi/backlink.cgi “$HTTP_HOST” “$SCRIPT_NAME” “$HTTP_REFERER”`; ?>

    I was losing some characters without them (ie: ‘;’ embedded in the query string).

  2. hallo!

    i am from vienna (sorry for my english)

    your script is very nice..

    but count by every reload,

    have you any idea ? to change this ?

    please let me know about this.

    thank you

    shiva

  3. Hi, I tried to install this. I changed only two things in the backlink.cgi:

    # The directory where you want to store the backlink files.

    # Note: must be writable by your web server

    my $backlinkdir = ‘http://users.rcn.com/ragnar/dagbok/backlink/’;

    and

    # PHP users should change this to 1

    my $php = 1;

    Then I added the following to my index:

    ? echo `perl http://cgibin.rcn.com/ragnar/cgi-bin/backlink.cgi “$HTTP_HOST” “$SCRIPT_NAME” “$HTTP_REFERER”`; ?

    But it looks as if this is not working.. any thoughts on that?

  4. The backlink directory should be a directory, not a URL. In your case, probably something like ‘/home/ragnar/htdocs/dagbok/backlink’. Otherwise, I’d recommend using Phil Ringnalda’s PHP backlink script.

  5. My own attempt to use your script hasn’t been successful. The results were so odd I ran my home page through a couple of validators hoping I could figure out what is amiss. I thought the results were odd enough to share.

  6. I removed the source of your page from your comment… Looks to me like the script is executing, but you’re not pointing to the correct backlink cache directory. It looks like your cache directory is the same directory as your PHP files; not a good thing.

  7. I have Dean Allen’s Refer running and thought I could use that directory for the cache. I created an empty directory and everything is working fine now.

    Many thanks,

    Richard

  8. Hi,

    Having trouble getting it to work. Here’s what I did:

    –Changed line 16 of backlink.cgi to:

    my $backlinkdir = ‘/usr/local/www/virtual1/66/175/41/14/html/cgi-bin/backlink_cache’;

    –created said backlink_cache directory in cgi-bin

    –set permissions for the directory to 777

    –copied backlink.cgi in ascii mode to cgi-bin directory and set permissions to 755

    –put the following code in my home page:

    <!–#exec cgi=”/cgi-bin/backlink.cgi” –>

    I thought I was all set, but it doesn’t work. Not even an error message. I’ve got another referral script running now that I want to replace because it hasn’t changed in over a month, yet I know I have had different referrals since then.

    Can you help? The installation instructions were so clear, I thought I’d get it on the first try!

    Also, I have another SSI running on the page, Poll-It, so the cgi-bin folder seems accessible.

    Thanks!

  9. Okay, I just tried to run the cgi from within my account control panel, and this is the message I got:

    edit backlink.cgi

    1 Useuninitialized value in substitution (s///) line 37.

    edit backlink.cgi

    I have no idea what this means or if it’s significant.

    I still get nothing — no error message — on my web page when I load it, however.

    Thanks!

  10. Cool script! It’s not working for me though…if you could offer any feedback – I’d appreciate it muchly 🙂

    I did the following:

    –>edited the backlink.cgi – my $backlinkdir = ‘/home5/kreator/justagirlintheworld.com/backlink/backlink_cache’;

    –>Set my /cgi to chmod 777

    –>Created /backlink for the cache and set it chmod 755

    –>Put the following line on the page I want the referrers to display: <!–#exec cgi=”/cgi/backlink.cgi” –>

    You mentioned in an earlier post that you have to have a minimum of two hits before it registers, so I hit my site from other sites that link to me – – and nothing.

    What am I doing wrong? Any help is GREATLY appreciated 🙂

  11. is it possible to implement this in blogger (or blog*spot?)?

    i’m very new to blogs and website though… i’d just follow the instructions but the only server i have access to, does not allow any server side script.

    anyway, i use enetation.co.uk for commenting system if that helps.

  12. hi, I’ve tested the script, and it works so far, but:

    I have a blog and I want to show the backlinks only on my entry sites and ONLY the backlinks which links especially to this site, e. g.

    If someone opens my entry site: http://www.ronsens.de/100.hmtl than the referers should be shown which are linking to this site

    at the moment ALL referers will be shown which has referred to any of the sites of my weblog.

    As far as I can see you have realized it on waxy.org as I wished it.

    My english isn’t the best, so I hope, you’ve understood what I meant.

    In one question: How can I change the scripts that the referer-links will be seperated for each entry-site of my weblog?

    Many thanks for any help.

  13. Hi, thanks for the script.

    I use it on my Japanese site with

    since my server doesn’t allow us to use exec command.

    But it works great!

    Keep up the good work!

  14. This is the only thing I changed…

    # The directory where you want to store the backlink files.

    # Note: must be writable by your web server

    my $backlinkdir = ‘/usr/etc/refcash’;

    # The total number of links you want to display for a single entry

    my $max_links = 10;

    # The minimum number of hits before a link is displayed

    my $min_hits = 2;

    I even parsed html to work as shtml, yet still no luck. 🙁

Comments are closed.