How To Get Total Feedburner Subscribers With JQuery and ASP


/ Published in: jQuery
Save to your folder(s)

Learn how to display the total number of Feedburner subscribers next to your 'subscribe' icon on your web site.


Copy this code and paste it in your HTML
  1. <%
  2. function GetFeedStats(rssFile)
  3.  
  4. Set objXML = Server.CreateObject("Microsoft.XMLDOM")
  5. objXML.Async = False
  6. objXML.SetProperty "ServerHTTPRequest", True
  7. objXML.ResolveExternals = false
  8. objXML.ValidateOnParse = false
  9. objXML.preserveWhiteSpace = false
  10. 'objXML.Load("http://api.feedburner.com/awareness/1.0/GetFeedData?uri="&request.QueryString("url"))
  11. objXML.Load("https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri="&request.QueryString("url"))
  12.  
  13. Set objRoot = objXML.documentElement
  14.  
  15. Set objItems = objRoot.getElementsByTagName("feed")
  16. For Each objItem in objItems
  17. temp = objItem.selectSingleNode("entry").getAttribute("circulation")
  18. Next
  19.  
  20. Set objRoot = Nothing
  21. Set objItems = Nothing
  22.  
  23. GetFeedStats = temp
  24.  
  25. end function
  26. %>
  27.  
  28. <script type="text/javascript">
  29. $(document).ready(function(){
  30.  
  31. $.get("feedburner.asp?url=ng-tech", function(data){
  32. $("#feedburner").text(data);
  33. });
  34.  
  35. });
  36. </script>
  37.  
  38. <span id="feedburner"></span>

URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=36

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.