Count inbound links: backlinks wordpress plugin
to all you SEO folks out there and other geeks ;)
Why another inbound links plugin?
I was looking for a plugin that could display the number of inbound links to my blog, but I only found plugins that used Technorati backlinks. Since I wanted to count all links and not only links from blogs, I wrote this plugin.
What it does
Backlinks draws a nice graph that shows how your number of inbound links develop over time using the MSN Search API together with nuSOAP to count the backlinks (MSN is, in my opinion, the most accurate SE to show backlinks).
Sample graph
Below you can see a sample graph (and no, this is not a real page %). This is what you are going to see on your Manage->Backlinks page.
Installation instructions
- Download the Backlinks zip package
- Extract it into your wp-content/plugins folder. Note that the folder MUST be named backlinks, otherwise it won’t work. Make sure the files are readable to the web server
- Activate the plugin on your plugins page. A new tab called “Backlinks” will appear in the “manage” menu.
- Go to http://search.msn.com/developer, click “Create and Manage Application IDs”, “Get a new AppID”, then copy your AppID into the field named “MSN Search Application ID” in your Backlinks tab in the “Manage” menu. Don’t forget to save :)
- Put [GDB_IMAGE] in a page/post to display the graph to your visitors.
- Enjoy :) (you’ll have to wait a couple of days before the graph starts to show something meaningful)
- Call back for updates
Hope you will enjoy it. You are, of course, very welcome to post suggestions / comments / bugs / questions.
UPDATE 1.01: Fixed bug with duplicate SoapCleint class in several configurations of PHP 5. Thanks to Dmytro Shteflyuk for bug report & patch suggestion.
UPDATE 1.02: Fixed wrong estimation of the number of links by MSN, the patch by Dmytro Shteflyuk :) Also a minor typo bug that stopped the Show: “all”, “week” etc menu from working.
UPDATE 1.03: Fixed a division by zero fault in early versions of PHP and an issue with blogs installed in subdirectories. Bugs reported by ‘Computer Guru’ :)
UPDATE 1.1: Added the posibility to display the backlinks graph to visitors.
köp viagra, cialis, prozac på internetapotek.
March 18th, 2006 at 5:34 pm
[…] Count inbound links: backlinks wordpress plugin Backlinks draws a nice graph that shows how your number of inbound links develop over time using the MSN Search API together with nuSOAP to count the backlinks […]
March 20th, 2006 at 3:19 pm
From the instructions, it is not clear: Do you need a new application ID for every blog on which you run this plugin?
Answer: Hi Kevin! You don’t need a new ID for every blog. Each blog uses one query to the MSN Search API per day, and I think each key provides 1000 queries, so you can run one key on 1000 blogs :)
March 21st, 2006 at 9:46 am
Hello
Thanks for nice plugin, but I have a trouble
On Backlinks page I have following error message:
Fatal error: Cannot redeclare class soapclient in /home/content/k/p/u/kpumuki/html/wp-content/plugins/backlinks/nusoap-lib/nusoap.php on line 7240
I’m using PHP 5.1.2
Answer: thank you very much for your bug report & patch suggestion. I have now updated the package.
March 21st, 2006 at 10:53 am
I have patched your plugin for my blog.
function wp_gd_backlinks_get_blcount($qu)
{
global $wp_gd_backlinks_option_appid;
$id = get_option($wp_gd_backlinks_option_appid);
if(!$id)return -1; // no api key
$request = array(
‘Request’ => array(
‘AppID’ => $id,
‘Query’ => $qu,
‘CultureInfo’ => ‘en-US’,
‘SafeSearch’ => ‘Off’,
‘Flags’ => ‘None’,
‘Requests’ => array (
‘SourceRequest’ => array (
‘Source’ => ‘Web’,
‘Offset’ => 0,
‘Count’ => 1,
‘ResultFields’ => ‘All’
)
)
)
);
$soapClient = new SoapClient(’http://soap.search.msn.com/webservices.asmx?wsdl’);
$response = $soapClient->Search($request);
return $response->Response->Responses->SourceResponse->Total;
}
March 24th, 2006 at 7:43 am
There is one small thing. In line:
{ echo ‘‘.$name.’ ‘;}
it’s neccessary to replace \ with /:
{ echo ‘‘.$name.’ ‘;}
And one moment I’m not understand. When I make first call to MSN, I’ve got:
Page 1 of 535 results containing linkdomain:http://kpumuk.info -site:http://kpumuk.info (0.12 seconds)
But if I go to the last page I’ve got real value
Page 9 of 90 results containing linkdomain:http://kpumuk.info -site:http://kpumuk.info (0.19 seconds)
Answer: thanks for the submission of these bugs & the patch to solve the MSN backlinks estimation issue. I’m not completely sure that it displays the correct number this way either, but I think it is more real. Still, an estimate is better than nothing, and you see the trend. I’ve updated the package.
March 24th, 2006 at 7:52 am
I’ve patched my version to make 2 calls:
if($usebuiltin) { // Patch by Dmytro Shteflyuk, http://kpumuk.info/ . Solves the dup soapclient class issue
$soapClient = new SoapClient(’http://soap.search.msn.com/webservices.asmx?wsdl’);
$response = $soapClient->Search(array(’Request’ => $params));
$params[’Requests’][’SourceRequest’][’Offset’] = $response->Response->Responses->SourceResponse->Total;
$response = $soapClient->Search($request);
return $response->Response->Responses->SourceResponse->Total;
}
else {
$soapclient = new soapclient(’http://soap.search.msn.com:80/webservices.asmx’);
$data = $soapclient->call(”Search”, array(”Request”=>$params));
$params[’Requests’][’SourceRequest’][’Offset’] = $data[’Responses’][’SourceResponse’][’Total’];
$data = $soapclient->call(”Search”, array(”Request”=>$params));
return $data[’Responses’][’SourceResponse’][’Total’];
}
March 25th, 2006 at 12:17 pm
Hi….
I have it installed and configured, but the graph is blank. And when I click the “All” link from the “Backlinks” page I get:
Cannot load backlinks\backlinks.php.
I have verified that file is there, CHMOD 777, Linux host……
Answer: it is normal that the graph remains blank for the first day. That “can’t load” issue was due to a typo error (must be ‘/’ and not ‘\’ :)), it is now fixed. Download the package again and it should be fine.
March 26th, 2006 at 6:48 am
Thanks! That fixed it!
March 26th, 2006 at 6:06 pm
I’m so sorry. I’ve made mistake :-(
$response = $soapClient->Search($request);
Should be
$response = $soapClient->Search(array(’Request’ => $params));
Excuse me again. Now it looks pretty well :-)
Answer: Yep, you’re right :) I’ve updated the package.
March 26th, 2006 at 8:45 pm
Hi Gustaf,
It seems there is a problem in backlinksimg.php :(
http://tinyurl.com/el7xq
It is supposed to return an image, it used to return an image in your first release, but now open that link in a web browser:
Warning: Division by zero in /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php on line 44
Warning: Division by zero in /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php on line 45
Warning: Division by zero in /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php on line 44
Warning: Division by zero in /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php on line 45
Warning: Cannot modify header information - headers already sent by (output started at /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php:44) in /home/neosmart/public_html/blog/wp-content/plugins/backlinks/backlinksimg.php on line 55
‰PNG IHDRlܰ®ê PLTEÈÈÈÿÿÿú6øIDATxœíÔ± 0EÑÔŽâ”ÖŽ`i%™R\@ððçð8|HÖžÛú7àKl-¶ß{l¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶
[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶[‹ÅÖbk±µØZl-¶
[‹ÅÖbk±µØZl-¶[‹5ßv[»ì¹wû4Ûö:7vxjíçõØà᩵ï÷cƒ‡§ØÚÔlÛä·0ù™[k²í •|9º9ÅIEND®B`‚
Answer: It seems to be an issue in several versions of PHP. I’ve fixed it & updated the package.
March 27th, 2006 at 12:32 pm
Sorry mate, its still not working….
http://tinyurl.com/el7xq
(sorry for ruining the layout of your blog with my earlier comment…)
Answer: (thanks for caring, dude :)) at last i figured why you kept getting zeros in backlink count even as you had backlinks on MSN. Your blog is installed in a directory, and linkdomain: cannot be used in this case :) I’ve made a fix to solve the issue. As to the division by zero fault, I believe you didn’t download the package again yesterday, since I fixed it at that time. Try downloading it again and it should be fine.
March 29th, 2006 at 1:06 pm
It works :)
No data yet, is that because I deleted the backlinks directory?
Answer: nope, it is because you haven’t been able to collect meaningful data (because of the /blog subdir issue), so there are only zeros, and then it shows the “no data” message. But tomorrow, you should be able to see results. Take care, gdymov
May 12th, 2006 at 1:55 am
How can I contact you about writing a simple WordPress plugin? Do you do that sort of thing in your spare time? If not, can you recommend someone? Thanks - amuse@m-ven.com or 214.550.2003
May 18th, 2006 at 10:57 pm
[…] Backlinks by Gustaf Dymov […]
May 26th, 2006 at 11:42 pm
Keep a good job up!
June 15th, 2006 at 4:38 pm
[…] Det finns vldigt mnga duktiga programmerare som gr plugins s det r bara att Googla runt s upptcker man snart vilket massivt urval man har, en svensk som gjort en bra Wordpress plugin r Gustav Dymov med sin plugin som rknar ingende lnkar till ens sida, ngot man br hlla koll p fr att se hur mnga inlnkar man har. Denna plugin anvnder MSN fr att visa inkommande lnkar i form av en graf se mer p Gustavs sida dr du ven kan ladda ner denna fina plugg: Gustav Dymovs plugin som visar inkommande lnkar […]
July 6th, 2006 at 10:51 am
I’m using Referer.org. It’s a similar service that publish all my inbound links.
July 21st, 2006 at 8:29 pm
[…] More information on this plugin can be found here - http://gdymov.com/inbound-links-backlinks-wordpress-plugin/ […]
August 2nd, 2006 at 3:46 am
Thank yu for plugin
August 15th, 2006 at 7:20 pm
[…] PLUGIN LOCATION: http://gdymov.com/inbound-links-backlinks-wordpress-plugin/ […]
August 26th, 2006 at 9:04 pm
As of today, you say ‘UPDATE 1.1′ at the end of the post; however, after file download/upload, in ‘plugins’ menu it is still shown as ‘Backlinks 1.0a’ (fresh install). Is that a typo or intended versioning system?
August 26th, 2006 at 9:22 pm
[…] All of these problems are solved in the backlinks WordPress plugin. Installation is easy, just a bit complicated by the need to get ‘application ID’ from MSN’s developer site. […]
September 1st, 2006 at 7:41 pm
There is a problem, see here:
http://tinyurl.com/gcvck
It should be 23K not 650.
Thanks.
September 7th, 2006 at 4:35 pm
Hi Jim,
it’s a bug at MSN :)
see here http://tinyurl.com/z5ybo
Usually, they fix such bugs in a week or so, but if it will persist I’ll make a fix for it.
September 25th, 2006 at 8:58 am
Excellent WordPress 2.0 Plugin
My thanks goes to the author of the Wordpress plugin.
Each plugin was needed to add the already rich features of WordPress 2.0 to hopefully give the end-user the features that they look for in any blog site.
The plugins used for my site are all stable …
September 25th, 2006 at 9:00 am
great plugin. no troubles with WP2.0.4. keep up the great work.
September 26th, 2006 at 3:27 pm
I have read the comments and it mentions the /blog bug. What is this bug? As I have my blog installed on the /blog/ folder and have had the plugin going for nearly 2 days now. See http://www.dicontas.co.uk/blog/backlinks-graph/ . I have created and updated the options with my unqiue AppID. Is no data showing simply because there are no backlinks to my new blog as yet. How do I manually run a query within Live Search (MSN) to test this is working?
Can anyone assist? Thanks. Stewart.
October 1st, 2006 at 1:41 pm
Thanks for the great plug in. It’s great to have something that tracks more than just Technorati.
I’m wondering if you might have a thought on something — my blog is relatively new at about 2 and a half weeks old. I’ve had 0, then 1, then 3 back links for the past 2 weeks. Then all of a sudden it shot up to 152. Seems odd. Can you shed light on whether you think I ought to trust that number, and why it might have shot up so much in a single day?
thanks very much
October 7th, 2006 at 1:02 am
Many thanks, I’ve just installed and tried out your plug in. I’m guessing I’ll see just how many links I don’t have in a day or two, but it is interesting none the less…
October 8th, 2006 at 10:52 pm
Juat a quick question… I have two sidebars in my wordpress blog - chrismerriman.com, is this a reason for IE displaying my site differently to FireFox, when I use the backlinks graph?
To clarify, in FireFox, the right hand side of the graph is clipped, in internet explorer, the whole post is split, moved down until the graph can fit in, after the two sidebars have finished.
November 5th, 2006 at 10:12 pm
[…] Backlinks (http://gdymov.com/inbound-links-backlinks-wordpress-plugin/) […]
November 12th, 2006 at 8:35 pm
Thanks for the plug-in. Stable on 2.04. Working nicely.
Great work. Thank you :)
November 23rd, 2006 at 2:29 am
Would you mind explaining this line in a little more detail:
“Put [GDB_IMAGE] in a page/post to display the graph to your visitors.”
I’m new to this and am unsure what it means. I’d like to display the backlinks graph on my dashboard if that’s possible?
Thank you!
November 28th, 2006 at 6:48 pm
[…] Backlinks - Gives you a nice graph representation of backlinks. Well having plenty of backlinks is essential in getting your site high on Google PageRank […]
November 30th, 2006 at 2:50 am
In backlinks.php, line 157, I suggest changing the parameter sent to the get_bloginfo function to wpurl as some people may locate the wordpress files in a different directory that what the url parameter returns - for instance the url resolves to the root of the domain, but the wordpress files are in a subdirectory of the root.
Cheers.
December 3rd, 2006 at 10:05 pm
Thanks for the cool plugin. I’ve installed it on my blog, now just waiting for the information to update. I’ll be sure to share it with my readers soon.
December 5th, 2006 at 8:15 am
I saw this on Wordpresss top recent posts and I think this a very beneficial article in general.
December 5th, 2006 at 11:44 pm
[…] track backlinks via MSN http://gdymov.com/inbound-links-backlinks-wordpress-plugin/ […]
December 8th, 2006 at 10:53 am
[…] Backlinks - Displays the amount of backlinks the MSN search engine reports for this site. Like this - Showing information for the period 2006-11-08 - 2006-12-08Powered by Backlinks by Gustaf Dymov, 2006. […]
December 27th, 2006 at 2:44 pm
[…] Backlinks - É um plug-in bastante útil que lhe permite saber em média quantos sites têm links para o seu blog. O script usa o Live Search para calcular os backlinks. Para trabalhar necessita duma MSN Search API ID. […]
January 7th, 2007 at 6:26 pm
Have you any thoughts of adding below the graph a bit of data showing the actual backlinks? In addition to counting them, it would be interesting to also display theme. Any support planned, or should I just hack at the plugin?
January 7th, 2007 at 10:55 pm
[…] Backlinks: show incoming links trend […]
January 12th, 2007 at 8:08 am
Thanks for this awesome plugin man! Its very helpful now i dont have to go to domain-pop every day to check my backlinks etc. :D
Cheers
-James
January 20th, 2007 at 10:36 am
Thanks for the plugin! Bookmarked it now and will add it to my blog soon :)
January 22nd, 2007 at 6:30 am
nice feature keep the plugins coming
January 24th, 2007 at 9:40 am
Hi, i resive the folowing 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 ‘3C7CBDA09BDF5918F034C487968BBAF0138E54BA’ at line 1]
SELECT * FROM wp_gd_backlinks ORDER BY day DESC LIMIT 3C7CBDA09BDF5918F034C487968BBAF0138E54BA”
using MySQL 5.0.21 on PhP5.1.1.
I chanche my php version to 4.4.1 but this dont fix it.
Do you have any idea?
February 4th, 2007 at 12:56 am
Hi,
I am trying to install your excellent plugin. After inserting the MSN ID, I get the following error:
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 ‘ day=NOW()’ at line 1]
INSERT INTO new_gd_backlinks SET num=, day=NOW()
Can you help please?
February 7th, 2007 at 3:52 pm
thanks for your great plugin! thank you.
February 9th, 2007 at 5:17 am
Very nice plugin
February 21st, 2007 at 8:09 am
[…] http://gdymov.com/inbound-links-backlinks-wordpress-plugin/ […]
March 27th, 2007 at 9:48 pm
Thanks a lot for the plugin :-) good work. John