APIs Archives

Async Google Analytics

Published by David Walsh on Friday, January 22, 201025 Comments

It seems like every website these days uses Google Analytics. And why not? It’s an outstanding tool that gives you any and every statistic you could ever want. The problem with Google Analytics is that it’s been, well, slow loading at times. That’s why I was so pumped when I saw Google was releasing an async version of their script.

Using the GitHub API and PHP to Get Repository Information

Published by David Walsh on Wednesday, December 30, 20097 Comments

GitHub is an awesome place to host your open source project code. MooTools, Prototype, and jQuery all use GitHub. As you probably know, the MooTools Forge requires your plugins be hosted on GitHub. The only problem with hosting all my MooTools plugins is that I lose traffic when I want people to see my code. Problem solved: use PHP, the GitHub API, and PHP Markdown to display files of my choice on my website.

Our goals with this code will be to:

  • Connect to GitHub via the API to retrieve repository information.

Simple PHP Caching and Content Retrieval Function

Published by David Walsh on Thursday, December 10, 20098 Comments

One way to make your website exponentially faster is by caching both remote and internal requests. Why request your RSS subscriber count from FeedBurner more than once a day if that count is calculated once per day? Why hit your database on each page load if that content rarely changes? I’ve created a primitive request-and-cache function for PHP that checks for fresh content in the cache and retrieves content from a source if fresh content isn’t available.

Get a URL’s Reddit Score Using PHP and JSON

Published by David Walsh on Wednesday, November 11, 200914 Comments
Reddit Guy

Since we can see Digg turning more into a funny-pic-and-vid site each day, I’ve turned my attention to Reddit. Reddit just seems more controlled and programmer-friendly. Since I have respect for Reddit I thought I’d put together a quick tutorial on how you can retrieve a URL’s Reddit score using PHP.

Dynamically Create Charts Using jQuery Flot and Google Analytics

Published by David Walsh on Thursday, October 22, 200916 Comments

jQuery Flot

Earlier in the week I published a popular article titled Dynamically Create Charts Using MooTools MilkChart and Google Analytics. My post showed you how to use MooTools MilkChart and a splash of PHP to create beautiful charts of Google Analytics data. I was interested in seeing what jQuery had to offer in the charting department. jQuery Flot is what I found.





© David Walsh 2007-2010. Contact David Walsh. Powered by the remarkable MooTools JavaScript framework.