News Feed
Sections

News Archive
feed this:

Zend Developer Zone:
Using GnuPG with PHP
August 04, 2008 @ 14:32:56

The Zend Developer Zone has a new tutorial posted today showing how to use the open source encryption tool GnuPG from inside PHP.

While GnuPG works very well as a standalone tool, it also plays very well with PHP. This integration is possible due to PHP's ext/gnupg extension, which provides a flexible and powerful API to access GnuPG functions for encryption, decryption, message signing and verification, and key maintenance. And your mission (should you choose to accept it) will be to accompany me over the next few pages, while I give you a crash course in this API, showing you how easy it is to integrate these functions into your next PHP application.

The tutorial walks you through some of the basic concepts behind the "lock and key" GnuPG implements and how to get the extension installed so you can follow along. His examples range from a basic encryption of a string out to a full encrypt/decrypt example, how to sign information with a key and even a method for sending an encrypted message.

0 comments voice your opinion now!
gnupg tutorial extension key message file crypt encrypt decrypt



Brian Moon's Blog:
in_array is quite slow
June 06, 2008 @ 09:36:47

Brian Moon had a problem - one of his cron jobs was lasting for much longer (hours!) than it should have been. He tweaked, tested and debugged the script and finally came down to a call to in_array, something he comments on as being "quite slow".

See, this job is importing data from a huge XML file into MySQL. After it is done, we want to compare the data we just added/updated to the data in the table so we can deactivate any data we did not update. [...] We then compared the two arrays by looping one array and using in_array() to check if the value was in the second array. [...] So, that was running for hours with about 400k items. Our data did not contain the value as the key, but it could as the value was unique.

He method, replacing the in_array call that had to do a full array scan for each time through the loop with an isset/unset combo on the unique key, changed the execution time down from about 4 hours to 0.8 seconds.

1 comment voice your opinion now!
inarray compare array unset isset unique key execution time


Web Development Blog:
First steps within the Zend Framework
November 21, 2007 @ 12:57:00

On the Web Development Blog, there's a quick tutorial they've created for replacing a Google search with a Yahoo one with the help of the Zend Framework and it's Service_Yahoo_Websearch component.

During the Zend PHP conference earlier this year, I got in touch with the Zend framework and learned that there is already a class to obtain results from the Yahoo search engine. The class has features to search the Yahoo API for web sites, image, news and the local search results.

They walk through the installation of the library (not the framework, though - you'll need that already set up), grabbing the API key from Yahoo and different applications of performing the search.

1 comment voice your opinion now!
zendframework beginner yahoo search api key zendframework beginner yahoo search api key


JSLabs Blog:
How to use the facebook API
October 05, 2006 @ 13:51:38

On the JSLabs blog today, there's a new tutorial showing how you (yes you) can use the Facebook Developer's API to pull information from their systems.

The facebook API allows you to access profiles, friends, photos, and events. To access the API from an outside server, you need to go through the following steps:

He uses the PHP library to make the connection - a simple call to the API (complete with API key, the location of the interface, a secret key, and a session key to provide a unique identifier. The request made logs a user in (much have a valid Facebook account) and grabs: the count of the messages waiting, the number of posts to your wall, and a list of available photo albums.

2 comments voice your opinion now!
facebook api library php5 interface account key facebook api library php5 interface account key


SitePoint Site Marketing Blog:
Track Your Rank Using the Google API
April 12, 2006 @ 07:24:27

Sitepoint, widely known for quality in content and tutorials, has a new post on its Site Marketing blog today dealing with tracking a site's Google ranking with the help of the Google API and the PEAR SOAP package.

Bernard Peh, the author, sets up what the Google API is and includes the way to grab your own API key (your pass into the powerful Google backend). The other two requirements for the project are the PEAR SOAP package and an install of at least PHP 4 or higher.

There's a list of input parameters for the functionality, with each described for what it does, and pley of code to help you integrate them into the API call. They give the example of the class grabbing the needed info (via SOAP), parsing out your URL from those results, and a simple form to make checking different URLs all the simpler.

1 comment voice your opinion now!
php google rank api key pear soap parameters php google rank api key pear soap parameters



Community Events











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


zendframework book package application cakephp code database PEAR ajax job releases zend release framework mysql security developer conference example PHP5

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