Using MetaWebLog with PHP-XMLRPC

Due to the fact that there is virtually no documentation available on how to get the MetaWebLog API working with the PHP-XMLRPC library, I decided to write this post. The MetaWebLog API is an application programming interface that allows data to be passed from a client to a server, and vice versa. It is used by all of the most popular blogging software, allowing the user to post blog entries from software like Microsoft Word or Windows Live Writer.

If you want to add MetaWebLog functionality to your custom blog or CMS, then this post will really help you. First off, download the PHP-XMLRPC library and upload the three files - xmlrpc.inc, xmlrpcs.inc, xmlrpc_wrappers.inc - found within the lib folder to your web server.

With that done, you can now start implementing the MetaWebLog functions. The first one you’ll need to implement is blogger.getUsersBlogs, otherwise software like Microsoft Word won’t recognise it as a valid MetaWebLog implementation. With that done, you can then start working on the functions that you might need to use.

To debug your code, make sure you take advantage of the XMLRPC debugger. And for more information on what each function is supposed to accept and return, check out Microsoft’s MSDN.

Below is the MetaWebLog implementation I developed to work with the PHP-XMLRPC library:


<?php // These three files are from the PHP-XMLRPC library.
    include(
“xmlrpc.inc”);
    include(
“xmlrpcs.inc”);
    include(
“xmlrpc_wrappers.inc”);

    /**
    * Used to test usage of object methods in dispatch maps
    */
    
class xmlrpc_server_methods_container
    
{

    }

  function userLogin($username$password$area) {

    // This is where you would check to see if the username and password are valid
    // and whether the user has rights to perform this action ($area)
    // Return true if so. Or false if the login info is wrong.

  }

    $getUsersBlogs_sig=array(array($xmlrpcArray$xmlrpcString$xmlrpcString$xmlrpcString));
    
$getUsersBlogs_doc=‘Returns a list of weblogs to which an author has posting privileges.’;
    function 
getUsersBlogs($xmlrpcmsg)
    {
    
$structArray = array();
    
$structArray[] = new xmlrpcval(array(
      
‘isAdmin’        => new xmlrpcval(true‘boolean’),
      
‘url’        => new xmlrpcval(‘http://blogurl’’string’),
      
‘blogid’    => new xmlrpcval(“The Blog ID”’string’),
      
‘blogName’    => new xmlrpcval(‘The Blog Name’’string’),
      
‘xmlrpc’    => new xmlrpcval(‘http://LocationOfThisFile’’string’)
      ), 
’struct’);    
        return new 
xmlrpcresp(new xmlrpcval($structArray,‘array’));
    }

    $newPost_sig=array(array($xmlrpcBoolean$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcStruct$xmlrpcBoolean));
    
$newPost_doc=‘Post a new item to the blog.’;
    function 
newPost($xmlrpcmsg)
    {
    
$blogid=$xmlrpcmsg->getParam(0)->scalarval();
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘addnews’) == true) {
      
$content=$xmlrpcmsg->getParam(3);
      
$title $content->structMem(‘title’)->scalarval();
      
$description $content->structMem(‘description’)->scalarval();
      
//$dateCreated = $content->structMem(’dateCreated’)->serialize();   // Not all clients send dateCreated info. So add if statement here if you want to use it.
      //$timestamp = iso8601_decode($dateCreated);  // To convert to unix timestamp
      
if($content->structMem(‘categories’)->arraySize() > 0) {
        
$categories $content->structMem(‘categories’)->arrayMem(0)->scalarval();
      }
      
$published=$xmlrpcmsg->getParam(4)->scalarval();

      // Put your DB queries in here to store the new post.       

      return new xmlrpcresp(new xmlrpcval($postid,’string’)); // Return the id of the post just inserted into the DB. See mysql_insert_id() in the PHP manual.
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }
    
    
    
$editPost_sig=array(array($xmlrpcBoolean$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcStruct$xmlrpcBoolean));
    
$editPost_doc=‘Edit an item on the blog.’;
    function 
editPost($xmlrpcmsg)
    {
    
$postid=$xmlrpcmsg->getParam(0)->scalarval();
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘editnews’) == true) {
      
$content=$xmlrpcmsg->getParam(3);
      
      
$title $content->structMem(‘title’)->scalarval();
      
$description $content->structMem(‘description’)->scalarval();
      
//$dateCreated = $content->structMem(’dateCreated’)->serialize();   // Not all clients send dateCreated info. So add if statement here if you want to use it.
      //$timestamp = iso8601_decode($dateCreated);  // To convert to unix timestamp
      
if($content->structMem(‘categories’)->arraySize() > 0) {
        
$categories $content->structMem(‘categories’)->arrayMem(0)->scalarval();
      }
      
$published=$xmlrpcmsg->getParam(4)->scalarval();
      
      
// Put your DB queries in here to update the post corresponding to the $postid.  

      return new xmlrpcresp(new xmlrpcval(true,‘boolean’));
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }
    

    $getPost_sig=array(array($xmlrpcStruct$xmlrpcString$xmlrpcString$xmlrpcString));
    
$getPost_doc=‘Get an item on the blog.’;
    function 
getPost($xmlrpcmsg)
    {
    
$postid=$xmlrpcmsg->getParam(0)->scalarval();
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘editnews’) == true) {
      
      
$result mysql_query(“SELECT * FROM sometable WHERE id=’$postid’ LIMIT 1″);
      while (
$row mysql_fetch_assoc($result)) {
        return new 
xmlrpcresp(new xmlrpcval(array(
            
‘postid’        => new xmlrpcval($row[‘id’], ’string’),
            
‘dateCreated’        => new xmlrpcval(iso8601_encode($row[‘timestamp’]), ‘dateTime.iso8601′),
            
‘title’        => new xmlrpcval($row[‘title’], ’string’),
            
‘description’        => new xmlrpcval($row[‘content’], ’string’),
            
‘categories’        => new xmlrpcval(array(new xmlrpcval($row[‘category’], ’string’)), ‘array’),
            
‘publish’        => new xmlrpcval($row[‘published’], ‘boolean’)
            ), 
’struct’));
      }
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }
    

    function deletePost($xmlrpcmsg)
    {
    
$postid=$xmlrpcmsg->getParam(1)->scalarval();
    
$username=$xmlrpcmsg->getParam(2)->scalarval();
    
$password=$xmlrpcmsg->getParam(3)->scalarval();
    
    if(
userLogin($username$password‘editnews’) == true) {
      
      
$query “DELETE FROM sometable WHERE id=$postid LIMIT 1″;
      
mysql_query($query) or die (mail(“your@email.com”,“Error with MetaWebLog deleting new post”,$query ‘ | ’ mysql_error()));
      
      return new 
xmlrpcresp(new xmlrpcval(true,‘boolean’));
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }
    
    
    
$getRecentPosts_sig=array(array($xmlrpcArray$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcInt));
    
$getRecentPosts_doc=‘Get the recent posts on the blog.’;
    function 
getRecentPosts($xmlrpcmsg)
    {
    
$blogid=$xmlrpcmsg->getParam(0)->scalarval();
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘addnews’) == true) {
      
$numposts=$xmlrpcmsg->getParam(3)->scalarval();

      $structArray = array();
      
      
$result mysql_query(“SELECT * FROM sometable ORDER BY timestamp DESC LIMIT $numposts”);
      while (
$row mysql_fetch_assoc($result)) {
        
$structArray[] = new xmlrpcval(array(
          
‘postid’        => new xmlrpcval($row[‘id’], ’string’),
          
‘dateCreated’        => new xmlrpcval(iso8601_encode($row[‘timestamp’]), ‘dateTime.iso8601′),
          
‘title’        => new xmlrpcval($row[‘title’], ’string’),
          
‘description’        => new xmlrpcval($row[‘content’]),
          
‘categories’        => new xmlrpcval(array(new xmlrpcval($row[‘category’], ’string’)), ‘array’),
          
‘publish’        => new xmlrpcval($row[‘published’], ‘boolean’)
          ), 
’struct’);    
       }
      return new 
xmlrpcresp(new xmlrpcval($structArray ‘array’)); // Return type is struct[] (array of struct)
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }
    
    
$getCategories_sig=array(array($xmlrpcArray$xmlrpcString$xmlrpcString$xmlrpcString));
    
$getCategories_doc=‘Get the categories on the blog.’;
    function 
getCategories($xmlrpcmsg) {
    
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘addnews’) == true) {
    
      
$structArray = array();
      
      
$result mysql_query(“SELECT * FROM categories”);
      while (
$row mysql_fetch_assoc($result)) {
        
$structArray[] = new xmlrpcval(array(
          
‘title’        => new xmlrpcval($row[‘title’], ’string’),
          
‘description’        => new xmlrpcval($row[‘description’], ’string’)
          ), 
’struct’);    
       }
      return new 
xmlrpcresp(new xmlrpcval($structArray ‘array’)); // Return type is struct[] (array of struct)
    } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
        
    }
    
    
$newMediaObject_sig=array(array($xmlrpcStruct$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcStruct));
    
$newMediaObject_doc=‘Upload media files onto the blog server.’;
    function 
newMediaObject($xmlrpcmsg)
    {
    
$username=$xmlrpcmsg->getParam(1)->scalarval();
    
$password=$xmlrpcmsg->getParam(2)->scalarval();
    
    if(
userLogin($username$password‘addnews’) == true) {
      
      
$file=$xmlrpcmsg->getParam(3);
      
$filename $file->structMem(‘name’)->scalarval();
      
$filename substr($filename, (strrpos($filename,“/”)+1));
      
//$type = $file->structMem(’type’)->scalarval(); // The type of the file
      
$bits $file->structMem(‘bits’)->serialize();
      
$bits str_replace(“<value><base64>”,“”,$bits);
      
$bits str_replace(“</base64></value>”,“”,$bits);
      
$uploaddir ‘/home/yourhostingusername/public_html/uploads/’; // Make sure this folder has been chmoded to 777.
      if(
fwrite(fopen($uploaddir $filename“xb”), base64_decode($bits)) == false) {
        return new 
xmlrpcresp(0$xmlrpcerruser+1“File Failed to Write”);
      } else {
        return new 
xmlrpcresp(new xmlrpcval(array(‘url’ => new xmlrpcval(‘http://blogurl.com/uploads/’.$filename’string’)),’struct’));
      }
        } else {
      return new 
xmlrpcresp(0$xmlrpcerruser+1“Login Failed”);
        }
    }

    $o=new xmlrpc_server_methods_container;
    
$a=array(
    
‘blogger.getUsersBlogs’ => array(
      
‘function’ => ‘getUsersBlogs’,
      
‘docstring’ => $getUsersBlogs_doc,
      
’signature’ => $getUsersBlogs_sig
    
),
        
“metaWeblog.newPost” => array(
            
“function” => “newPost”,
            
“signature” => $newPost_sig,
            
“docstring” => $newPost_doc
        
), 
        
“metaWeblog.editPost” => array(
            
“function” => “editPost”,
            
“signature” => $editPost_sig,
            
“docstring” => $editPost_doc
        
),
        
“metaWeblog.getPost” => array(
            
“function” => “getPost”,
            
“signature” => $getPost_sig,
            
“docstring” => $getPost_doc
        
),
        
“metaWeblog.getRecentPosts” => array(
            
“function” => “getRecentPosts”,
            
“signature” => $getRecentPosts_sig,
            
“docstring” => $getRecentPosts_doc
        
),
        
“metaWeblog.getCategories” => array(
            
“function” => “getCategories”,
            
“signature” => $getCategories_sig,
            
“docstring” => $getCategories_doc
        
),
        
“metaWeblog.newMediaObject” => array(
            
“function” => “newMediaObject”,
            
“signature” => $newMediaObject_sig,
            
“docstring” => $newMediaObject_doc
        
),/*
            ’blogger.getUserInfo’ => array(
                ’function’ => ’getUserInfo’,
                ’docstring’ => ”Returns information about an author in the system.”,
                ’signature’ => array(array($xmlrpcStruct, $xmlrpcString, $xmlrpcString, $xmlrpcString))
            )*/
            
‘blogger.deletePost’ => array(
                
‘function’ => ‘deletePost’,
                
‘docstring’ => ‘Deletes a post.’,
                
’signature’ => array(array($xmlrpcBoolean$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcString$xmlrpcBoolean)) 
            )
    );

    $s=new xmlrpc_server($afalse);
    
$s->setdebug(2);

    $s->service();
    
// that should do all we need!
?>

I hope that helps you. :)

Merry CHRISTmas!

Just wishing you all a very Merry Christmas as you remember the birth of our Savior, Jesus Christ.

Are you a Good person?

Bridging the gap with the One Laptop Per Child scheme?

People for a very long time have been searching near and far for a solution to bridge the gap between the worlds’s financially wealthiest and poorest (United Nations 2001). Will the One Laptop Per Child (OLPC) idea be the solution to the problem? This article will expose some of the most out-standing arguments opposing the idea; but do they stand a chance? Read on to see the verdict.

The One Laptop Per Child scheme was an idea brought forth by Nicholas Negroponte at the World Economic Forum at Davos, Switzerland in January 2005. The idea behind it was a new way for children in developing nations to learn through independent exploration and interaction. The laptop will be Linux-based, with a dual-mode monitor system, totalling only a mere $100 per unit. However it won’t boast a hard-drive, instead it will feature 500MB of flash memory. The Central-Processing-Unit (CPU) will be clocked at 500MHz with 128MB DRAM at hand (Negroponte 2006).

The thinking behind this project is, if children in developing countries get an education, they can then get a proper job and fend for themselves (Anonymous 2006).They believe that the $100 laptop would solve this problem, mainly by giving them an education. However, there are much cheaper ways of doing this. Building enough schools and having adequate teachers so that everyone is given the same opportunity for an education is the first step. This is much cheaper than supplying a laptop to every child who in some cases will not have anyone (teachers) to explain how to use it. The children who will receive the laptop are illiterate, so how are they expected to learn from it unless they get initial teaching from a teacher? Many places in developing countries don’t have adequate teachers to teach the kids how to use the machine. So that means they first have to hire teachers, making the initial $100 investment blow out to something even more expensive. Why couldn’t they just hire enough teachers and then spend the money on buying text books and pencils for everyone?

Laptops, just like any other machine, breaks-down every so often. What happens when a child’s laptop breaks-down? Nothing, it is not like they can get next day on-site assistance. Instead, the laptop is now simply useless. What will happen to all the old machines when they don’t work anymore? They will most likely be thrown out; the country will have millions of dead machinery lying all around the street. On average, laptops usually have a 5-year life span; will the governments fork out more millions or billions of dollars every five-years to replace the old ones? Adversely, text books, if looked after carefully, should last at least 10 years – double the length that laptop’s last.

The money spent on the millions of laptops could be better well spent, with people in some countries who are without food or easy access to a doctor (Anonymous 2005). How is mathematics or other forms of education going to help them when they are sick? Or how is a laptop going to help them when they are starving? It’s a plain fact, it won’t. In a lot of developing countries’, families work on a farm so that they can have just enough to eat each day. This includes the children working on the farm after school each day.

The laptop is aimed to be distributed to developing nations, with the government of the country being expected to pay for it. But the countries that really need the laptops have governments that are already in heavy debt (Anonymous 2006); how can they be expected to pay hundreds of millions or even billions of dollars (one million laptops is the minimum shipment amount) for this?

Even if some developing nations can afford to buy a batch of $100 laptop’s, some have a poor reputation of being corrupt (Salih 2004), so therefore, one can predict that these laptops won’t be given to the children who need them most, but will rather be sold to businesses and the upper class. This is not the intended audience the project organises hoped for.

The $100 Laptop is planned to be distributed to various countries around the world, however, what languages will it be in? Will they force everyone in those countries to learn English? There are between 3,000 and 8,000 languages in the world (Anonymous n.d), one can be sure that they will not be able to support all of them.

The organisers of the project say that the laptop will be able to access the Internet (Negroponte 2006), however to set up wireless access points (WAP) all around the country and have network technicians to fix the problems when they occur, comes at a very high price tag. This money could be spent on more important things, such as food or clean drinking water.

What if, after distribution of millions of these little green machines, a virus sweeps across the world that knocks all of them out of action? Or if a hacker finds a vulnerability in the software on the laptops so that he/she is able to steal all the information stored on each one? How are they going to get a software update for them? They will not be able to without a great deal of hassle. So, the government has just wasted millions or even billions of dollars on purchasing these laptops.

The laptop is planned to contain a hand-crank from which it can be charged up (Anonymous 2006). This way of powering the machine is not very well investigated, with different sources saying different things for how long it will be able to operate for the amount of cranking completed. Some sources (Anonymous 2006) say 1:10 – 1 minute of turning will give ten minutes of operating time. Others (Smith 2005) say 1:3 – 1 minute of turning will give 3 minutes of operating time. The fact is, it’s not a very reliable power source. For the children in developing countries who only just manage to eat enough food each day, how can they be expected to turn the crank for hours daily? That means they would have to eat more food!

Theft is not only present in first-world countries, it is everywhere in the world. One can probably imagine that these laptops will be a common source of it. If children are walking home with one of these laptops, older people will get jealous and probably steal it off them. There may be even gangs set up that steal as many as they can and sell it to the black market. Would this happen if the kids where holding a textbook? I don’t think so.

The one laptop per child idea may have some benefits – as an interesting independent way to learn. However, the negatives against the idea clearly outweigh the positives. I commend the organisers of the project because of their willingness to help people, but a rethink of how it can be done better is required.

Bibliography

  1. Anonymous, 2006, $100 laptop, (WWW document) Available URL: http://en.wikipedia.org/wiki/$100_laptop [Accessed 2006, March 4].
  2. Anonymous, One Laptop per Child, (WWW document) Available URL: http://pedia.media.mit.edu/wiki/One_Laptop_per_Child [Accessed 2006, February 20].
  3. Felsenstein, L. Problems with the $100 laptop, (WWW document) Available URL: http://fonly.typepad.com/fonlyblog/2005/11/problems_with_t.html [Accessed 2006, February 28].
  4. Leinonen, T. The $100 Laptop: Manna-vaporware, (WWW document) Available URL: http://flosse.dicole.org/?item=the-100-laptop-manna-vaporware [Accessed 2006, February 26].
  5. Negroponte, N. 2006, Frequently Asked Questions, (WWW document) Available URL: http://laptop.org/faq.en_US.html [Accessed 2006, February 22].
  6. Noon, C. Intel’s Barrett Dismisses $100 Laptop As ‘Gadget’, (WWW document) Available URL: http://www.forbes.com/facesinthenews/2005/12/12/intel-barrett-mit-cx_cn_1212autofacescan03.html [Accessed 2006, March 2].
  7. Smith, S. 2005, The $100 laptop — is it a wind-up? (WWW document) Available URL: http://edition.cnn.com/2005/WORLD/africa/12/01/laptop/ [Accessed 2006, March 4].
  8. Tzeng, D. Taiwan notebook makers skeptical of MIT budget laptop production schedule, (WWW document) Available URL: http://digitimes.com/news/a20051201A2006.html [Accessed 2006, March 5].
  9. United Nations, “WE MUST DO MUCH BETTER TO BRIDGE GAP BETWEEN RICH AND POOR”, SAYS DEPUTY SECRETARY-GENERAL IN ADDRESS AT QUEENS UNIVERSITY, (WWW document) Available URL: http://www.unis.unvienna.org/unis/pressrels/2001/dsgsm143rev1.html [Accessed 2006, March 6].

Outer Maths v1.0.0 Released

I’ve been working on a game the past couple weeks, it’s called Outer Maths. Some information about it:

Outer Maths is a computer game designed to help bring some fun into Maths; it works by combining a thing students love to do, that is, play computer games, with Maths, a subject a lot of people struggle at. The game is designed for middle school (upper primary) aged students, supporting the main four operations in Maths, addition, subtraction, multiplication and division. And best of all, the game is free!

Website
Download

Perth.com.au is the Most Coveted .au Domain Name

The Australian Domain Authority (auDA) has released the results of a ballot to find out what .au geographic domain people want the most. In the end, perth.com.au was the winner, with cairns.com.au and margaretriver.com.au following behind.

Overall, there was 10,000 applications sent in, covering a range of over 2700 commercial geographic domain names across Australia.

Top 20:

1. perth.com.au (138)
2. cairns.com.au (132)
3. margaretriver.com.au (127)
4. canberra.com.au (93)
5. byronbay.com.au (92)
6. bondi.com.au
7. surfersparadise.com.au
8. casino.com.au
9. portdouglas.com.au
10. manly.com.au
11. newcastle.com.au
12. geelong.com.au
13. hobart.com.au
14. darwin.com.au
15. coffsharbour.com.au
16. parramatta.com.au
17. broome.com.au
18. airliebeach.com.au
19. wollongong.com.au
20. alicesprings.com.au

The most popular domain in each state and territory:

ACT – canberra.com.au
NSW – byronbay.com.au
NT – darwin.com.au
QLD – cairns.com.au
SA – portadelaide.com.au
TAS – hobart.com.au
VIC – geelong.com.au
WA – perth.com.au

Official Xbox 360 Countdown, by Microsoft itself

Update: After researching this further, origen is a spanish word for origin and in 37 days the Xbox 360 will be released in Japan, the origin of the Xbox 360.

A recently registered domain, origenxbox360.com, has been registered by what it looks like Microsoft. The WHOIS has all the same details as any other Microsoft owned site, plus it points to the Microsoft domain servers.

On the site it has a picture of a tree and what looks like a green rabbit. Behind these pictures is a faint flash countdown, currently at 37 days. Is this a countdown to the release of the Xbox 360? Or is it a countdown for another announcement Microsoft is going to make about the 360? Who knows, but we do know it is related to the Xbox 360.

One then begins to wonder what is with the origen part of the domain name. I guess all with be revealed once the countdown hits 0.

What is displayed so far:
Origin Xbox 360 - 37 days to go

What is displayed when countdown reaches 0:
Origin Xbox 360 - Finished

SHA-1 Broken by Faster Method

The SHA-1 encryption, now widely used for most cryptology applications, has been broken by a faster method, with research done by Xiaoyun Wang, Andrew Yao and Frances Yao. The new method can crack the encryption in 263, just slightly better than their previous effort of 269, and better than the brute force method of 280. The researches said that over the coming month they will revise their work to possbily improve it.

I’m still surprised that most things (including the US govenment and SSL) still use SHA-1, and haven’t moved onto a variant of SHA-2 (eg: SHA-384, SHA-512, etc.).

Google Forgets to Erase out Detailed Shots of White-House

Google has recently updated and added new data for over 100 cities in their Google Earth program. In this it includes the Washington DC area, and Google has forgotten to erase out the roof of the white-house (which they have done previously).

Whitehouse Fully Visible
Click on the image for a full view.

Zotob worm on the loose

A new worm, called Zotob, has hit the internet recently by exploiting a vulnerability affecting Windows users. The worm scans random machines for activity on port 445. If a venerable machine is found, the worm is then downloaded from the scanners machine and copied to the newly-found machine. The worm then sets up an FTP server on that computer and searches for other venerable computers.

Microsoft has recently released an update this month to patch this worm, so all users are highly recommended to upgrade immediately if they haven’t already.

Javascript method to bypass WGA still works!

Within 24 hours of the release of Microsoft’s new Windows Genuine Advantage tool, there was information on the internet to bypass it easily by pasting a javascript code into the address bar. About 11 days ago, Microsoft caught on to this method and blocked it. I was just retrying the method today and seems that it now works again!

The javascript code you have got to paste into your address bar when it asks you what method of updates you want (whether Express or Custom) at Windows Update is:

javascript:void(window.g_sDisableWGACheck=’all’)

Note: You need to have the Windows Genuine Advantage tool installed first for it to work, or it will prompt you to install it.

Update: It seems that the javascript method of bypassing the WGA does not work anymore. Disabling the Windows Genuine Advantage tool in Internet Explorer -> Manage ad-ons still works though.