Skydrive direct link/hot link Hack

Skydrive is free excellent online storage disk from Microsoft, but has some limitation regarding Link sharing and hotlinking a file from the Skydrive, To download a file from Skydrive, you will have to visit Skydrive

To know more about skydrive, Click HereWL-SkyDrive_h_rgb

If you manage to get a direct download link from skydrive download page, It will stop working after one or two days. Because these download links are dynamic. Microsoft wants Skydrive users to visit their website so that they can keep making money from Ad Views and Clicks.

Good thing about this drive is, it is hosted on Microsoft’s Cloud, So it provides you almost 100% up time with unlimited download access i.e No Bandwidth limit and 25GB space.

People have made scripts to track download links, but most of these scripts are hosted on their own server with no service guarantee.

So I wanted to make a workaround to overcome this problem which is reliable and efficient.

I made a simple javascript code which tracks the download link with the help of Yahoo Query Language (YQL) API (A service from YAHOO).

This script is useful for web publishers and bloggers and can be installed on your website or blog in a minute.


  • JQuery
    JQuery is a very popular javascript library and a large number of sites are using it to enhance their site visibility and user Interface. If it is not installed on your blog/Webpage already, just add the below code in the header (i.e anywhere between <head> and </head> tag).
    <script type="text/javascript" src=""></script>

  • Link Tracker Code

    Below is the link tracker code, add this code anywhere in the head section of your page. If you are using blogger, you can paste this code in a HTML/Javascript Gadget.

<!--Code written by Waqar's Blog--><script type="text/javascript">
function loadLinks(newUrl,url){
var text = $(this).text();
var replacedcode = '<a href="'+newUrl+'" target="_blank">'+text+'</a>'
function getJSONdata(){
var url = $(this).attr('href');
var queryAPI = "";
var query = "select * from html where url=\""+url+"\" and xpath=\'//div[@id=\"spPreviewContainer\"]/a/@href\'"
var queryFinal = queryAPI+encodeURI(query+"&format=json&callback=");
$.getJSON(queryFinal, function(json){
if (json.query.results == null) newUrl = "";
else newUrl = json.query.results.a.href;

Well, here is a video to guide you through the installation. Though I have shown it on blogger blog, it can be used with any webpage, blog service or CMS.

Note: This code will not work for files having extensions doc, docx, ppt, xls or any MS Office file extesion. To use with such files, first zip it and then upload to Skydrive.

After installation, you can start posting Skydrive links on your Blog. Make sure that the link which you are copying from Skydrive is public and correct.

Your copied link will look something like this. to your file/filename with extension

E.g Links

If you post a wrong link, it will just redirect you to an error page.
Please let me know through your comments, if you find any bug or want to tell other modification/suggessions.

Here I list two blogs which are using this code to stream their MP3 files, directly from Skydrive. In next post, I’ll post a vide which will guide you to integrate Yahoo Media Player with Skydrive to play your Media Files on your page: