News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Zend Developer Zone:
Using the Stack Exchange API with PHP (part 2)
January 21, 2011 @ 11:12:22

The Zend Developer Zone has posted the second part of a series from Vikram Vaswani about using the Stack Exchange API to pull questions and comments users have posted to the site. In this second part of the series he shows how to get more information about those users and their activities.

The thing to remember about questions, answers and comments, though, is that they don't exist in a vacuum. They're created by users, and it's the users that make the site tick. That's why the Stack Exchange API includes a large number of methods designed to let developers access user profiles and timelines, and unearth the relationships between users and their posts. This article will focus primarily on this dimension of the Stack Exchange API, illustrating how to search for users, obtain user profiles and timelines, and retrieve information on a user's questions, answers, comments, badges and tags.

You'll need to get the StackPHP PEAR package to follow along with the code examples (it does some of the hard work for you). He shows how to:

  • Grab a list of users ordered by reputation
  • Search for usernames matching a string
  • Get badge information (in general and for a user)
  • Finding a user's activity timeline

Near the end he also includes an example of using the Zend_Paginator component of the Zend Framework to filter down the results to a more manageable size.

0 comments voice your opinion now!
stackoverflow api tutorial pear stackphp


blog comments powered by Disqus

Similar Posts

Dotvoid.com: Generating Excel files with PHP

Community News: Latest PEAR Releases for 07.16.2007

Gary Hokin: An Introduction to Zend Framework 2 for the Zend Framework 1 Developer - Part 1

PHPBuilder.com: Taking Advantage of Simple Cloud with the Zend Cloud Component

Derick Rethans\' Blog: Parsing Mail with PHP


Community Events





Don't see your event here?
Let us know!


community framework podcast introduction language testing api release threedevsandamaybe symfony2 interview refactor unittest code developer series opinion laravel list install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework