News Feed
Sections




News Archive
feed this:

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

WebLessons.info:
Login with LinkedIn
June 25, 2014 @ 10:47:16

The WebLessons.info site has a new tutorial posted showing you how to use the LinkedIn authentication handling to allow your users to log in with their own account information.

LinkedIn is a business-oriented social networking service. It is mainly used for professional networking. So if you are having an application or website that serves working professionals then its very important for you to implement login with LinkedIn in your application. By this way you can able to access the data of your users like email, work history, education etc. So now let's dive into the coding part.

They walk you through the various steps, providing screenshots or code where applicable:

  • Creating a LinkedIn Application
  • Get the API Key and Secret Key
  • Create the database and set up the PHP configuration to connect
  • finally, the PHP code for the login form and making the request to LinkedIn

A live demo can be found here (but if you're paranoid about your credentials, I wouldn't use it) and you can download all files included in the tutorial.

0 comments voice your opinion now!
linkedin login tutorial application api key secret

Link: http://weblessons.info/2014/06/25/login-with-linkedin-tutorial-php/

The Code of a Ninja:
Salt, Hash and Store Passwords Securely with Phpass
June 16, 2014 @ 11:15:37

In this post to the CodeOfANinjs.com site, they walk you through password hashing, salting and storage using the PHPAss tool from OpenWall. The post itself is a bit older, but the content still provides a good example to teach the basics.

I think the main reason why we have to hash passwords is to prevent passwords from being stolen or compromised. You see, even if someone steal your database, they will never read your actual or cleartext password. I know that some PHP frameworks or CMS already provide this functionality, but I believe that it is important for us to know how its implementation can be made.

The tutorial shows you how to use the library and how to store the result in a simple "users" table in a MySQL database. The examples hash the password given from a simple form and use prepared statements (via PDO) to save it to the database. All PHP, HTML and CSS code you'll need - including the login form that checks the username/password - is included. There's also a few screenshots showing what the resulting forms and data should look like.

0 comments voice your opinion now!
phpass tutorial hash salt password storage mysql user

Link: http://www.codeofaninja.com/2013/03/php-hash-password.html

Michael Dowling:
Favor Hash Lookups Over Array Searches
March 21, 2014 @ 10:47:34

Michael Dowling has a recent post to his site comparing the performance of hash lookups versus array searches.

A common programming requirement is to match a string against a set of known strings. For example, let's say you were iterating over the words in a forum post and testing to see if a word is in a list of prohibited words. A common approach to this problem is to create an array of the known prohibited words and then use PHP's in_array() function to test if the string is found in the list. However, there's a simple optimization you can make to significantly improve the performance of the algorithm.

He includes two pieces of sample code - one showing the searching of an array using in_array and the other running an isset to locate a key. He points out that the in_array method is quite a bit slower than the hash (key) lookup and includes a benchmark script to prove it.The results are pretty clear, with the hash lookup coming in about 480% faster than the in_array. He also points out that as the size of the strings you're comparing grows, the performance of in_array drops even more.

0 comments voice your opinion now!
hash lookup search array inarray benchmark

Link: http://mtdowling.com/blog/2014/03/17/hash-lookups-over-array-search/

SitePoint PHP Blog:
The Pros and Cons of Zend Certification
February 10, 2014 @ 11:35:49

The SitePoint PHP blog has a new post that weighs the pros and cons of getting the Zend PHP Certification. The Zend Certified PHP Engineer is described as "a measure of distinction that employers use to evaluate prospective employees".

As a PHP developer, you may have been asking yourself how to improve your skills, gain reputation or become more professional in your work. One of the ways of doing so is to get through a certification programme. The only one that covers PHP itself (not a particular framework or software solution) is being delivered by the Zend company. In the remainder of the article I will focus on this particular certificate and describe its advantages and disadvantages. At the end I will also mention some other certification programs that may be valuable to a PHP developer.

He starts with a bit of general information about the certification including some of the categories it covers. He then gets into the pros and cons, listing two items for each. He suggests that it's a good way to measure your knowledge but there is a question of how much it really proves to get a passing score.

0 comments voice your opinion now!
zend certification opinion pro con developer

Link: http://www.sitepoint.com/pros-cons-zend-certification/

PHPBuilder.com:
Implementing Secure Passwords in PHP 5.5
January 29, 2014 @ 11:17:40

On PHPBuilder.com today there's a new post introducing you to a relatively recent advancement in PHP (in version 5.5), the password hashing API. In this article they cover the basics including hashing and verifying the result.

PHP has always had a few simple ways to implement password hashing to an extent. MD5 and SHA1 are examples of this, but the security of these methods is not what it should be. [...] What we need is a secure password encryption mechanism that uses SALT and perhaps even something else to help us safely encrypt our passwords for later use. [...] Lucky for us, the folks at PHP have thought about this long and hard, and the result is a very simple PHP password hashing API that is not only easy to use, but fast and secure.

They briefly look at the two major functions in the updated feature - password_hash and password_verify and some basic code examples of their use.

0 comments voice your opinion now!
secure password hash php55 passwordhash passwordverify introduction

Link: http://www.phpbuilder.com/articles/application-architecture/security/implementing-secure-passwords-in-php-5.5.html

PHPClasses.org:
Lately in PHP Podcast #43 - "Is Facebook HHVM going to Replace Zend Engine in PHP6"
January 20, 2014 @ 11:36:41

On the PHPClasses.org site today they've published the latest episode in their "Lately in PHP" podcast series, Episode #43 - "Is Facebook HHVM going to Replace Zend Engine in PHP 6".

The Facebook HipHop Virtual Machine, HHVM, has been evolving a lot, so PHP developers are considering it as a possible replacement for Zend Engine in PHP 6. This was one of the main topics discussed by Manuel Lemos and César Rodas in the episode 43 of the Lately in PHP podcast. They also discussed other topics like FastCGI support in HHVM, having PHP function naming consistency plans for PHP 6, TLS peer verification for secure connections, and using Composer to install JavaScript, CSS and images for PHP projects.

You can listen to this latest episode either through the in-page player, by downloading the mp3 or watching the live video recording from the Google Hangout.

0 comments voice your opinion now!
hhvm zend engine php6 podcast latelyinphp episode

Link: http://www.phpclasses.org/blog/post/225-Is-Facebook-HHVM-going-to-Replace-Zend-Engine-in-PHP-6--Lately-in-PHP-podcast-episode-43.html

Lorna Mitchell:
Zend Certified PHP Developer 5.5
January 08, 2014 @ 09:23:45

If you're thinking about taking the Zend Certified PHP Developer (5.5) test but aren't sure exactly where to start, Lorna Mitchell has provided a list of some good resources to help you out.

Yesterday I updated my previous ZCE certificate to the Zend Certified PHP Developer qualification (the new ZCE for PHP 5.5 also got a new name). Since the ZCE 5.3 exam is no longer available and I work with various clients to prepare their teams for these certifications, it was important to me that I keep my own certification up to date. Now I've done that, I'd like to share some resources for others doing the same thing.

She points to a few things that could help you make the grade:

0 comments voice your opinion now!
zend certified developer test certification resource list

Link: http://www.lornajane.net/posts/2014/zend-certified-php-developer-5-5

Ulf Wendel:
PHP Memcache access to MySQL 5.7, faster? Redis?
December 13, 2013 @ 12:56:50

In a new post to his site Ulf Wendel shows an alternative use for the PHP Memcache functions - using them to query MySQL tables (InnoDB) in much the same way. He also tosses in Redis as another version to compare the performance against (for fetching key/value pairs).

PHP users can use two client protocols to query MySQL 5.6 and later. Not only standard SQL access but also faster key-value access to InnoDB tables is possible using the Memcache protocol. The MySQL benchmark team reports crazy figures. Of course, on hardware that makes the average PHP meetup visitor roll his eyes and say "yeah, Oracle, *yawn*". I've repeated my plain PHP benchmarks on an i3 desktop. And, I've added Redis to the game.

He goes through and compares a few different things with some simple benchmarks around operations per second:

  • MySQL 5.6 Memcache vs. MySQL 5.7 Memcache vs. Memcache vs. SQL
  • MySQL vs. Memcache vs. Redis

For each he's graphed out the results of the benchmarking with some surprising results for those that may thing MySQL isn't as suited as Redis for something like this.

0 comments voice your opinion now!
mysql redis innodb memcache benchmark key value

Link: http://blog.ulf-wendel.de/2013/using-phps-memcache-interface-to-query-mysql-5-7/

Inviqa techPortal:
Create a RESTful API with Apigility
December 04, 2013 @ 09:29:15

On the Inviqa techPortal they've posted a new tutorial from Rob Allen introducing Apigility, the recently announced API management and creation tool from Zend. He uses his usual album/music illustration to show how to create a simple API inside the tool.

On the 7th October 2013, Zend introduced Apigility to the world. Once you get beyond the name, you see a very interesting project that allows you to easily create a web service without having to worry about the nitty-gritty details. Which details? Well, Apigility will handle content negotiation, error handling and versioning for you, allowing you to concentrate on your application. In the recently tagged 0.7 release, Apigility also supports both HTTP and OAuth2 authentication. In this tutorial we will create a simple REST API that allows us to view a list of music albums, showing how to start using Apigility and how to publish an API using this tool.

He walks you through all the steps you'll need to create the basic API, more specifically around the "Albums" data and functionality:

  • Creating a new project with Composer
  • Using the Admin dashboard to create a new API
  • Making a new REST endpoint (albums)
  • Building an Album collection endpoint (with Collection, Entity and Resource)
  • Making the data model, including the table SQL

He includes all the code you'll need for these last few items and shows the curl calls to make for grabbing a single and multiple album listings. There's also a brief discussion in there about how Apigility handles API versioning with some internal handling.

0 comments voice your opinion now!
apigility zend rest api tutorial introduction

Link: http://techportal.inviqa.com/2013/12/03/create-a-restful-api-with-apigility/

Zend Blog:
Rise of the Native Cloud Developer - ZendCon Keynote
October 11, 2013 @ 12:54:22

If you weren't able to make it to this year's ZendCon conference that just happened in Santa Clara, you can get at least a little piece of it from this new post to the Zend blog. It's a video from a keynote session from Peter Magnusson titled "Rise of the Native Cloud Developer."

At his keynote session at ZendCon, he shared some of the important and sometimes unexpected lessons Google learned while building for the cloud - such as the importance of lightweight execution containers, relying on failure, and how to overcome the speed of light when building distributed systems.

And then he went ahead to discuss about the rise of the "Cloud Native" developer - how engineers and organisations large and small now using these principles to build truly robust and scalable services, and businesses.

You can watch it embedded in the post or full size on Youtube.

0 comments voice your opinion now!
zend zendcon13 cloud native developer keynote video

Link: http://blog.zend.com/2013/10/10/rise-native-cloud-developer/


Community Events





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


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

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