How to add a link exchange manager into your blog

Posted on 14th March, 2006

Exchanging links with other websites or blogs is one of the ways for you to promote and increase your blog traffic. Getting links from other sites or blogs can also increase your PageRank. Your PageRank, combined with other onsite ranking criteria will give your pages a better chance to be ranked high in Google search results.

WordPress comes with a built in links exchange tool that allows you to links to other sites. This tool should suffice for most people link exchange needs. However if you want more you’ll have to look somewhere else.

Here at Sabahan.com, I’ve added a Partners page that allows others to add their own links. I am using Link manager LinkMan from PHPJunkYard.

Here’s how it works: When someone fills out and submit the Add Link form, LinkMan verifies if a reciprocal link to Sabahan.com has been added before adding the link into Sabahan.com’s Partners page. Currently, I haven’t seen any WordPress plugin that is able to do this so LinkMan is a good alternative.

If you prefer, you can install LinkMan by itself without bothering with WordPress integration and just place a link pointing to your link page anywhere from your blog. All you have to do is edit LinkMan’s header.txt and footer.txt files to match your blog template design. But if you want a seamless integration, you’ll have to perform several extra steps. Since LinkMan is not a WordPress plugin itself, we’ll have to find a way to integrate and run it from a WordPress page.

To do this I use PHPExec from Priyadi.net. This plugin lets you execute dynamic PHP code in posts. Note that if you are using WordPress 2.0, you’ll need to use the patched version to make this works.

Now, just install the PHPExec plugin as you nomally would with a plugin. Once activated, proceed with the LinkMan installation by following the instructions as outlined in the Readme.htm file that comes with the script. After installation, your LinkMan link page normally can be accessed via http://www.yourdomain.com/linkman/links.php.

But what you want to do now is to run links.php from a page in your blog. To do so, create a page and place the following code on the page editor.


<?php include("/path/to/my/links.php"); ?>



You can also wrap the code itself from links.php with the <phpcode> tags instead of linking directly to the links.php file. Either way, you’ll need to remove the following line from links.php since you won’t be using those files anymore to create your header and footer.





You may also want to edit other HTML element in your link page to match your blog template design as close as possible.

So there you have it, a functional, and easy to use link manager on your blog!

Thanks to LiewCF.com for the pointer.



An engineer by training, Victor has been working full-time online as an Internet marketer, a programmer and an app developer since 2001. He has been blogging at Sabahan.com since 2006 sharing his experience and teaching people how to make money online. Click here to join his private Facebook Group for bloggers.

  • harshit says:

    thanx a ton gaman….very informative..

  • […] set up a link system using Linkman from PHPJunkYard and from tips found in Sabahan.com. Linkman makes it easier to set up links by visitors to my site and provide almost maintenance free […]

  • papajoneh says:

    thanks gaman… at least I know it works. Hmm… now back to my host for some explanantion 😉

  • papajoneh says:

    Gaman, is this plugin still working? it does not seem to work in my wp2.2… the phpexec I mean. The Linkman error:
    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /public_html/wp-content/plugins/phpexec.php(64) : eval()’d code on line 2
    any idea?

    • Gaman says:

      I can confirm that it works with wp2.2. You might want to check with your host why they disable “URL file access” on the server

  • […] but not least, thanks to Gaman for providing information on How to add a link exchange manager into your blog. Good luck to you all Bookmark This Entry At: These icons link to social bookmarking sites […]

  • there is error on the script, can read reciprocal link in rajaringgit.net, eventhough I have added sabahan.com

    Our URL (http://sabahan.com) wasn’t found on your reciprocal links page (http://rajaringgit.net)!

    Please make sure you place this exact URL on your page before adding your link!

  • toxicle says:

    I used php Link Directory for that … works fine with loads of features. Version 2 is free but 3 is not though.

  • Gaman says:

    you can use <li></li>

    something like

    echo "<li><a href=\"$url\" target=\"_new\" class=\"linkman\" rel="nofollow">$title</a> - $description</li>\n";

  • Gaman says:

    Orait no problem 🙂

    • Joneh says:

      got another Q… this must be CSS coding.. the numbering sequence… no.1, 2, 3 etc… can u help me gaman? just this part im stuck now. the program works as intended. but really need some thinkering with the coding. The Form Action=” “.. really need to put the directory path in full. other than that.. all cosmetic. help me pls. jsut want the numbering thing. 😉

  • Joneh says:

    sorry to disturb u again gaman… but i think i double requested my blog in the partner page. My blog is listed at no.8 and no.9. You can remove one of them.. one only ok. 😉
    thanks. Im back at this page coz im in the process of adding this link manager thing, so balik belajarlah sini.

  • Joneh says:

    great… my hosting server is down on and off. probably thats the “why”. but i do appreciate be in the partner page.. for i am a true sabahan :crying:

  • Joneh says:

    im newbie..dont shoot me! what is “URL with reciprocal link”.
    already added sabahan.com link for a long time… i put it in the blogroll. Am i not qualified? Or do i need to have PR5?

    • Gaman says:

      Joneh, it’s not your fault. I noticed a bug in the link exchange manager where it removes a few links automatically for some reason.

      Try adding your link again while I try to find a solution for this. Cheers.

  • Gaman says:

    I am no MYSQL expert here.. 🙂 Anyway here’s a quick guess, try removing the “\” at the end of ‘shamsul el\’

  • shamsul says:

    hi there…ive tried to installed the plugin and such and everything looked fine until i refresh my page,then i saw this line:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”shamsul el\” at line 1]
    SELECT * FROM wp_users WHERE user_login = ‘shamsul el\’

    what is it anyway?
    how to debug this…thanks


  • Pai says:

    yup, i like this tool..

    i use it for link directory at http://www.rajalaut.com
    pretty simple to understand..

  • TheWheeler says:

    Great idea! Link popularity actually boosted my SERPs. 🙂

  • Gaman says:

    Sorry, I don’t know. You’ll have to contact your server administrator or hosting company for this info. It should be somtehing like


    but you’ll have to contact your hosting company for the full path.

  • Ahmad says:

    if my my file way uploaded in my public_html directory in my server with the folder name ‘linkman’..then what would be the correct php code i should use in my page editor?

  • Gaman says:

    Well, it does not matter what it means. It’s like the name of a folder in my computer and you would have different folders in your computer. I couldn’t possible know what folders are available in your computer. But this time we are talking about folders in your server.

  • Ahmad says:

    the file was uploaded in (public_html) with the of linkman directory..

    Please state it in detail:
    ‘var’ meam what?

  • Gaman says:

    Ahmad: I do not know the correct path for your server. You’ll have to check with the person who uploaded the files into your server.

    If you want an example path


  • Ahmad says:

    which is correct?

    Dudez..I have some problem here..what exactly the correct path to
    view my
    can you give me some example?
    i’ve installed my LINKMAN to http://www.ahmadamir.com/linkman/

  • mohdismail says:

    thanx..it’s working now~

  • Gaman says:

    mohdismail: It looks like you path is incorrect /path/to/my/links.php.

    Make sure to edit the correct file to reflect the correct path.

  • mohdismail says:

    i’ve problem to run the php in my new create page…the error said that:

    Warning: Unknown: failed to open stream: No such file or directory in /home/isma/public_html/wp-content/plugins/phpexec.php(64) : eval()’d code on line 3

    Warning: Unknown: Failed opening ‘/path/to/my/links.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/isma/public_html/wp-content/plugins/phpexec.php(64) : eval()’d code on line 3

    can you help me with this?

  • […] Inbound links It is very important that you get many inbound links to your web site. If you have many good inbound links, then you can get high rankings. Try to find sites which are related to your site and ask them to exchange link with you. If you are using WordPress, you can put a link exchange manager to your blog. The detail instructions can be found at Sabahan.com. […]

  • Gaman says:

    I guess you’ll have to fiddle with the code in order to do that. I’ll need sometime to figure it out since I am not a PHP programmer 🙂

  • amy says:

    is there a way to make the links to show in several pages (like a navigation bar), since i have a lot of links requests but don’t want it to be too long on one page?

  • Techblogy says:

    Haha, good way to get more link.
    I gonna have i too on my blog soon.
    Come to exchange with me too 😛
    Thanks pal for the information.


  • Keith Derr says:

    I have been using Reciprocal manager for a few years now on all of my websites… never thought about using it with my blogs till now… cool idea.
    I have been big into reciprocal linking, but I totaly agree it has to be theme based or it will not work.

    Even better, do three way linking. Link your blog “A” to another persons blog “B”, and he in turn links to your blog “C”.

    This way it looks more natural to the search engins. And does not look like a reciprocal link excahnge… final note. .stay away from Link exchange sites… Google knows who they are, and from what I can tell they are penilizing sites that use em.

  • […] Actively seek other blogs to link exchange with. Make sure that they are related to your niche. You might also want to setup a link exchange manager in your blog. […]

  • […] Hoy mismo he encontrado este articulo en inglés en el que se explica como integrar un script en php externo dentro del diseño de tu blog wordpress. Otra forma sería cambiar el diseño del propio script al de la plantilla del blog. Aunque esto es matar moscas a cañonazos. […]

  • Gaman says:


    Glad to know it’s working 🙂

  • menj says:

    Ok, never mind about the above. I managed to make it work 🙂

    – MENJ

  • […] I have started a Partners page based on the Linkman script and after following the instructions from Sabahan. I laboured about a few hours before I finally made the script work […]

  • menj says:

    My “partner’s page” doesnt work. I followed your instructions as above.


    A link should be showing up, you can see it at the original Linkman page:


    – MENJ

  • Thilak says:

    Add Form worked !


  • Thilak says:

    Thanks for your Quick Reply !!

    But It doesn’t work.

    The form and other stuff loads in the Page but i get error when trying to add link.

  • […] How to add a link exchange manager into your blog « Sabahan.com Here at Sabahan.com, I’ve added a Partners page that allows others to add their own links. I am using Link manager LinkMan from PHPJunkYard. […]

  • Gaman says:

    Hi Thilak, glad to know it helps. To ad the sign up form, just create a page and paste the HTML code.

  • Thilak says:

    How to add the Sign up form to the page ??

    I tried but it too me to index.php when i filled the form

  • Thilak says:

    Thanks for Posting this article, It helped me a lot. Intially i had some problems but then I did it

    See this


  • […] In the meantime, you can learn how to setup link page on your blog. […]

  • >

    Sign Up Below... For Tips and Tools to Help You Build a Better Blog

    >> Sign Up Now and get access to:

    • chevron-circle-right
      The exact methods I use to make money
    • chevron-circle-right
      Resources to increase traffic to your blog
    • chevron-circle-right
      The latest updates from Sabahan.com

    We hate spam. Unsubscribe anytime.