 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Liip Blog: 2-Step Verification with Google Authenticator and PHP
by Chris Cornutt August 31, 2011 @ 09:53:05
On the Liip blog there's a recent post talking about a tool Google offers to help you authenticate your users, a one-time passcode generator called Google Authenticator. The post talks about a PHP port of the same idea.
The main point about 2-step verification is that something else than your computer provides that token. If it's on your computer and that one gets stolen (or hacked into), it won't help much for the additional security. That's why you need a second device for those tokens. Some banks do that with SMS/Text Messages (Facebook, too), other give you special devices for that (eg. RSA keys) and the last group does it with your smartphone.
At the request of a client, they created a tool that did just this, but for PHP. As a result, they created the GoogleAuthenticator library that makes it easy to implement in your application. There's even an example of it in use. For more information about the Google Authenticator tool, see this page on Google Code.
voice your opinion now!
google authenticator library port twostep verification user qrcode
Project: Google Storage Plugin for CakePHP
by Chris Cornutt July 14, 2011 @ 11:03:21
Jonathan Bradley has submitted a handy new helper for the CakePHP users out there that can help to work with Google's Storage in a drop-in plugin - the Simple Google Storage Plugin for CakePHP.
Ever noticed how there is no decent support for CakePHP to utilize Google Storage? Well the wait is over, after realizing that Amazon S3 was just way to unreliable and bloated with spammers and usuage hogs. You can now add Google Storage support to your CakePHP application.
Obviously you'll need to be set up with Google Storage before using it, but the tool makes it as simple as calling publish() to push the data out, return all of the bucket information for your account and pull out information about individual objects. There's also a method that lets you make new buckets on the fly to make categorization simpler.
The heart of the code lies in the Storage class, so if you want to see how it's done, check that first. Other frameworks have their own interfaces with the Google services too, like the Zend Framework's Zend_GData component.
voice your opinion now!
google storage cakephp plugin bucket file
Martin Sik's Blog: How to "steal" Google's "did you mean" feature
by Chris Cornutt May 19, 2011 @ 12:49:32
In a a new tutorial posted on his blog Martin Sik shows you how to "steal" the "did you mean..." functionality that Google's sites currently offer. His example uses cURL to get the current Google request URLs and fetch the associated results.
I really like Google and the classic "did you mean" feature is really great, unfortunately when I wanted to implement it into my project a realized that it's not provided by any of Google's APIs. [...] I believe for most developers [having a large dictionary and extend the dictionary when new terms are available] are unachievable. And so it's for me. So I was thinking if I can bypass these drawbacks and let Google do all the job for me.
The source code is included with the post showing two methods - fetching a "did you mean" block to parse or how a term is attached to a Google URL and the results are returned in JSON and parsed for display. Obviously, this is an external dependency you could consider if you put it into your application, but it can be quite a powerful tool in the right situations.
voice your opinion now!
google suggestion feature curl url json
PHPRiot.com: Translating Text Using the Google Translate API and PHP, JSON and cURL
by Chris Cornutt May 06, 2011 @ 08:45:04
On PHPRiot.com there's a new tutorial showing you how to use the Google Translate service to translate the text of your website into any language they support. They interface with it using a cURL connection and JSON messaging.
Google Translate is a service from Google that you can use to translate text or HTML from one language to another. One of the great features of this service is that they now offer an API to let you programmatically translate text. In this article I will show you how to interact with the Google Translate API. Initially, the Google Translate API was available only via JavaScript. This has now changed, as version 2 offers a REST interface which returns translations in JSON format.
They talk about the input parameters you can give the service, the enforcement of query limits and how to handle the results that are returned. The response message is, by default, in JSON so a simple call to json_decode should be all that's needed. They've also included a sample class you can drop in and use for your translation needs (as well as sample usage code).
voice your opinion now!
google translate api json curl tutorial language
|
Community Events
Don't see your event here? Let us know!
|