How To Put Live Cricket Score On Your Website

Putting a LIVE cricket score on your website is now very easy. Thanks to for providing a feed for live matches. Today we will discuss a method by which you can get the LIVE cricket score with the help of Javascript and Yahoo Query Language (YQL). Not only in your website but you can also put it in your PC and can view the score instantly. This will be very useful in some places where the sports related websites are blocked.

How does it work ?

Cricbuzz provides an XML feed which shows live matches and scores. We have written a script which will fetch the XML data with the help of Yahoo Query Language (YQL) and read the data using JavaScript. Everything will happen almost instantly. It can be viewed in any browser. It will show you match details, place, current score and the status. Lets have a live demo.

How to display only a single match ?

If you look at the JavaScript code, you can find a line saying var ONLY_SHOW_MATCH_FOR = "";

You can simply change its value to filter out matches. For example, to show only the India vs Australia match, open the live demo and see the first line (AUS vs IND). Copy this line and set it there for ONLY_SHOW_MATCH_FOR. So you should change the line to var ONLY_SHOW_MATCH_FOR = "AUS vs IND";

For any help drop a comment :)