 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Where on Earth are You?
by Chris Cornutt February 02, 2012 @ 08:52:54
In PHPMaster.com's latest tutorial Lukas White introduces you to using the Yahoo "Placemaker" web service to geographically locate a place from a free-form text string. The results include "place details" like the type of the location, latitude, longitude and how confident they are in their match.
The challenge then is to do two things: work out what place you could be talking about, disambiguate if necessary, and then identify exactly where on Earth that is. That's what I'll show you how to do in this article; by using a freely available web service, we'll write a simple program to ask users where they are (and ask them to clarify if necessary) before identifying their responses in concrete terms.
He shows how to make a request to the Placemaker web service, passing it a string coming from the user, to be located. The POST request contains a few pieces of data including an application ID
, your desired output type and the language you're using for the input. His example code uses curl to make the request and handles it (the XML response at least) with a call to simplexml_load_string.
voice your opinion now!
where geolocation yahoo placemaker webservice api tutorial
Jakub Zalas' Blog: Mocking Symfony Container services in Behat scenarios with Mockery
by Chris Cornutt January 20, 2012 @ 13:54:52
Jakub Zalas has a recent post to his blog with a hint about how to test Symfony container services by mocking them (when testing with Behat) with the help of Mockery (and the PSSMockeryBundle).
Mocking objects in unit tests is pretty straightforward as every object used in a test case is usually created in a scope of one test class. In functional tests it's a bit harder since we either don't have full control over objects being created or it's simply too laborious to mock half the framework. [...] We're getting the service from a container [in the example] and calling a method which should send a lead. The problem is we don't want to actually call an API while executing Behat scenarios.
Rather than hitting up the API for each test, he opts to create mock objects and results with the tools Mockery has to offer. He gives code for a "is API available" method that either returns a valid container or a mocked object, depending on how it was called.
voice your opinion now!
mock mockery object behat symfony api tutorial
Kevin Schroeder's Blog: Call for webinars (Zend)
by Chris Cornutt January 18, 2012 @ 11:50:07
Kevin Schroeder is looking for suggestions. He wants to know what the PHP community wants to hear about in upcoming webinars from Zend.
Just wrapped up a call working on our webinar schedule for the year. We've got a bunch of ideas but we'd like to also get your input as well. Yes, I know y'all want ZF2 webinars. We have that down. I would also like to do an HTML5 and mobile webinar but I need an SME (Subject Matter Expert) for that. [...] I would also love to have webinars on how to use various API's, even if there is not native PHP support. So, what kinds of webinars do you want?
Leave your suggestions in his comments along with one already suggesting a "Why PHP?" checklist of sorts to help encourage companies/employers to go with the language.
voice your opinion now!
opinion webinar share zend zf2 html5 api
NetTuts.com: Creating an API-Centric Web Application
by Chris Cornutt January 03, 2012 @ 13:18:19
On NetTuts.com there's a recent post from Nikko Bautista about creating an API-centric application and how it can help you make a more flexible, accessible application overall. Code is included to make a simple TODO list application based on this idea.
Planning to start working on a new web application? In this tutorial, we'll discuss how to create an API-centric web application, and explain why this is essential in today's multi-platform world. [...] An API-Centric Web Application is a web application that basically executes most, if not, all its functionality through API calls. [...] Another characteristic of an API-Centric Web Application is that the API will always be stateless, meaning it can't recognize API calls by session.
He talks about how doing the work like this, though it might seem like more trouble up front, can lead to an easier time later when you need to add multi-platform support (or even open it to customers directly). In the sample application, he shows the creation of a TODO application that can create, read, update and delete items via an API. Also included is a bit of code to help secure your service with an APP ID and APP SECRET authentication set. Full code for the backend API and the frontend to interface with it can be downloaded here.
voice your opinion now!
api application tutorial frontend todo
XPertDeveloper.com: Get Facebook Page Detail Using Graph API and PHP
by Chris Cornutt January 03, 2012 @ 11:06:04
New from the XPertDeveloper.com blog there's a tutorial showing how to use the Facebook graph API to get page details via a simple cURL request (cURL PHP support required for the example).
Here is the technique to get the detail of the Facebook page with Graph API and PHP. This is the very easy method to get the Facebook page detail. So Let's see how to get this done. With this method you can get details of any Facebook page [inluding] name, picture, link, website, products, description and if the user can post to it.
The sample code is only a few lines - it uses the Facebook page ID (easy to grab from the URL) and fetches a URL with it as a parameter. The output is returned as a standard PHP object with all of the properties attached (decoded from JSON). This is just one of many methods the Facebook graph API has, so check out their documentation for more methods and details on returned values.
voice your opinion now!
facebook graph api curl request tutorial
Sameer Borate's Blog: Amazon Advertising API BrowseNodes
by Chris Cornutt January 02, 2012 @ 11:02:56
In this new post, Sameer Borate shows you how to use his Amazon BrowseNodes script to work with the returned data from the Amazon Advertising API.
The BrowseNodes tool automatically gets all the child BrowseNodes and their names. The program recursively traverses the BrowserNode hierarchy and returns all the BrowseNodes and their respective names. You can display the nodes on the console or save it to a CSV file. You can also include the library in your existing projects to process BrowseNodes.
You'll need curl support on your system to make it work. Several code examples are included showing how to grab a certain node, showing a list of nodes, saving the node information to a CSV, changing locales and getting the parent node for the current node.
voice your opinion now!
amazon advertising browsenodes api interface
Project: PHP-Powered MyFcc.gov Portal Launches (Beta)
by Chris Cornutt December 29, 2011 @ 11:58:27
As is mentioned in this new post to the Seabourne site by Mike Reich, the FCC (Federal Communications Commission) has launched their new portal, MyFcc (beta). The Seaborne post talks about the technology they used to create this widget-based dashboard.
MyFCC is a personalized dashboard for power users that provides a simple way to access a broad range of content coming out of the agency. MyFCC content is powered by the Content API module, and is built using our very own Cumula Framework.
The site is based on an API the FCC provides and makes it simpler to hone it down to just the information you need.
MyFCC is a new approach to open government - making the content easily available to everyone, everywhere via APIs. Using the Content APIs, the public can create their own tools like MyFCC.
You can find out more about the launch of MyFcc in this official press release.
voice your opinion now!
fcc myfcc government api framework cumula
NetTuts.com: Wrangling with the Facebook Graph API
by Chris Cornutt December 02, 2011 @ 13:37:09
On the NetTuts.com site today they have a (very complete) guide to help you wrangle the Facebook Graph API and make it useful for your application. It makes use of the official Facebook PHP SDK to interface with the Graph API.
Have you ever wanted to learn how to make your applications more social with Facebook? It's much easier than you think! In this tutorial, we'll be building an application that reads and publishes data to and from Facebook using Facebook's Graph API.
The tutorial helps you get signed up on the Facebook developer site, create a first sample application, set up the SDK and make a simple page (with an added bonus of using the Twitter Boostrap for look/feed). There's a section covering permissions, what kind of data you can expect publicly for both users and posts. They wrap it up with an example of posting back to Facebook though the API and updating the status on your account. The complete code for the tutorial is also available for download.
voice your opinion now!
facebook graph api tutorial sdk permissions
PHPBuilder.com: Talking to GitHub with PHP
by Chris Cornutt December 01, 2011 @ 11:28:40
PHPBuilder.com has a new tutorial posted about interfacing with GitHub in PHP, using their API to hook into and pull down information about users and repositories.
The Git-based project hosting service GitHub is certainly the belle of today's technology ball, having attracted more than 1 million registered users and amassed more than 2 million hosted projects in less than three years. [...] GitHub High Scores and GitHub Badges are two examples of third-party services created using the GitHub API, which is capable of carrying out any task you might wish to perform via GitHub.com. With it you can create, edit and search repositories, learn more about fellow GitHub users, and manage repository issues.
Jason shows how to use the php-github-api library to connect to the API, search repository information, get user details, finding their repositories and accessing restricted resources (things only available for the authenticated user like updating your account or working with your own repositories).
voice your opinion now!
github api library phpgithubapi tutorial repository user
|
Community Events
Don't see your event here? Let us know!
|