Posted By

neal_grosskopf on 02/23/09


Tagged

rss jquery ASP


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

neal_grosskopf
umang_nine
Balamir


How To Get Total Feedburner Subscribers With JQuery and ASP


 / Published in: jQuery
 

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

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

  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>

Report this snippet  

You need to login to post a comment.