News Feed
Jobs Feed
Sections




News Archive
feed this:

Sameer Borate:
Efficiently Replicating RETS data to MySQL
May 03, 2013 @ 10:26:33

Sameer Borate has a new post to his site that shares how he converted a RETS database to MySQL with the help of a PHP library, PHPRETS.

A recent project of mine entailed replicating a RETS database on a local MySQL database server. The client had a new real-estate mobile search app in development and wanted to have a local copy of the RETS database for search queries instead of a remote RETS server. [...] Replicating RETS data rather than using the live version is slightly complex, however. In order to replicate the RETS data into your own local database, a series of processes are needed in order to make sure the data you have is both updated and in sync with the server.

He breaks it down into three main steps with some sample code for each:

  • Grabbing the complete database once
  • Keeping the data in sync
  • Ensuring the cron job is executed on regular intervals
0 comments voice your opinion now!
rets database replication mysql phprets library tutorial

Link: http://www.codediesel.com/data/efficiently-replicating-rets-data-to-mysql

A
April 16, 2013 @ 10:57:01

On his site Lukasz Kujawa has posted a new tutorial showing you how to perform automated backups to Google Drive of files through their API (using his own library).

Where do you keep backups? I guess that depends on what do you backup. You might have a very clever answer for a business critical data but what about less important content? The best example would be a private blog. It will hurt if you lose your data but the odds are you're not willing to pay for any reliable storage. [...] There is one reliable storage, which is 100% free and almost everybody have access to it. Yes, I'm talking about Google Drive.

He walks you through the process of setting up your Google Drive account API access and where to find the data you'll need to make the connection. He then links over to his project that makes the backup a simple few lines of code (mostly configuration) of a backup path of your choice out to the remote Google Drive account.

0 comments voice your opinion now!
automated backup cp2google library google drive tutorial

Link: http://systemsarchitect.net/automated-backups-to-google-drive-with-php-api

PHP.net:
PHP 5.4.14 and PHP 5.3.24 released!
April 11, 2013 @ 09:07:21

As is mentioned on the main PHP.net site today PHP 5.4.14 and 5.3.24 have been released:

The PHP development team announces the immediate availability of PHP 5.4.14 and PHP 5.3.24. These releases fix about 10 bugs aswell as upgrading the bundled PCRE library. All users of PHP are encouraged to upgrade to PHP 5.4.14.

Users are encouraged to update to this latest release. You can find the latest version either on the downloads page (source) or the Windows site (binaries). If you're curious what all changed in this release, check out the Changelog.

0 comments voice your opinion now!
language release stable bugfix pcre library update

Link: http://php.net/archive/2013.php#id2013-04-11-1

NetTuts.com:
Aspect-Oriented Programming in PHP with Go!
April 10, 2013 @ 10:56:41

In this new tutorial on NetTuts.com today they introduce you to aspect-oriented programming (AOP) in PHP through the use of the Go! PHP library.

The concept of Aspect-Oriented Programming (AOP) is fairly new to PHP. There's currently no official AOP support in PHP, but there are some extensions and libraries which implement this feature. In this lesson, we'll use the Go! PHP library to learn AOP in PHP, and review when it can be helpful.

They start with a brief history of AOP in general and a basic vocabulary of some of the common terms like "point-cut", "aspect" and "cross-concern." They briefly look at some of the other PHP tools for AOP, but then help you get Go! up and running. Sample code is included showing how to integrate it into your project and, more practically, create a logging system that can be used as an aspect.

0 comments voice your opinion now!
aspect oriented programming tutorial go library introduction

Link: http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php-with-go

Andrew Podner:
PHP 5.5 Preview New Password Hashing API
March 25, 2013 @ 12:32:26

Andrew Podner has posted about the password hashing functionality that's coming with PHP 5.5 - how it will work and some of the benefits of its use.

Recently PHP 5.5 was released into beta, which puts us one step closer to another release of PHP. This week, I thought I would spend a little time explaining a new feature that will be implemented in 5.5 that will hopefully make dealing with passwords easier for developers to grasp and properly implement. I cannot tell you the number of apps, even ones written within the last year or so, that I open up only to find either an md5 hash, or worse, clear text password storage. I keep telling myself that eventually this will come to an end, and people will stop taking the easy way out. Maybe PHP 5.5 will have made it so easy that there is simply no further excuse not to implement solid password hashing.

He includes an example of the four new functions that will come with the hashing functionality: password_get_info, password_hash, password_needs_rehash and password_verify. He includes the parameters that should be included in each call and the details from the call to get the hash's info. If you're not going to be able to move up to PHP 5.5 when it's released, you might consider looking into this compatibility library to have a similar interface and functionality (for 5.3.7 or greater).

0 comments voice your opinion now!
preview password hashing api compatibility library introduction


QaFoo.com:
Mocking with Phake
March 13, 2013 @ 12:53:26

On the QaFoo blog today there's a new tutorial posted showing you how to make unit test mocks with Phake, a testing tool that works a bit differently that other options (PHPUnit's own mocking and Mockery).

The use of Mock and Stub Objects is an important skill to learn when using Test Driven Development (TDD). Mock objects allow you to replace dependencies of an object with lookalikes, much like crash test dummies are used during automobile safety tests so humans aren't harmed. [...] Using Mocks in PHPUnit tests means using the built-in MockObjects library for quite some years. In the last years two contenders emerged that can be used as optional dependencies in PHPUnit. [...] This blog post introduces Phake, because it works quite differently than both PHPUnit Mock Objects and Mockery.

They include a code example of how to create mocks with Phake, showing it's different approach to defining the mocked methods. They explain each part of the code, detailing the use of the "when", "thenReturn" and "verify" methods. You can find out more about Phake and see other examples in the project's documentation.

0 comments voice your opinion now!
mocking unittest phake library tutorial introduction


PHPMaster.com:
Integrating Open Authentication using Opauth
March 11, 2013 @ 09:07:52

On PHPMaster.com there's a new tutorial showing you how to implement OAuth authentication in your application using the Opauth Php library. This library lets you connect to any of a number of OAuth service providers and authenticate.

Open Authentication has evolved as a standard for third-party authentication in recent years and allows us to securely authenticate our application's users through a standard interface. Twitter and Facebook has been the standouts among dozens of authentication service providers. [...] In this article we'll explore how we can effectively use Opauth to standardize our authentication strategies. I'll be using CodeIgniter here, but even if you're not familiar with CodeIgniter, I suggest you continue reading since it will be similar for other frameworks as well. Once you understand the necessary details for integration, adapting to any framework is super simple.

He talks some about the Opauth library and shows the full authentication flow that your script will follow when using it. Code is included showing how to include and integrate the Opauth library including setup and configuration of the object and the controller/view code to implement the login form.

0 comments voice your opinion now!
opauth oauth library tutorial implement authenttication


Vance Lucas:
Valitron The Simple Validation Library That Doesn't Suck
March 05, 2013 @ 11:43:24

Vance Lucas has created a "validation library that dosen't suck" and posted about it to his site - his Valitron library.

Valitron is a simple, minimal and elegant stand-alone PHP validation library with NO dependencies. Valitron uses simple, straightforward validation methods with a focus on readable and concise syntax.

He created the library because of frustration with other tools that had (sometimes major) dependencies on other packages. All he wanted was something lightweight and easy to use that was flexible about how it handled its validation rules. Valitron lets you apply a validation (like "required") against multiple fields in the provided data and includes checks for things like length, valid IP, active URL, alpha-numeric, date format and regular expression match. You can also add custom validation rules via a callback/closure.

0 comments voice your opinion now!
validation library valitron simple dependencies


Simon Holywell:
Idiorm and Paris 1.3.0 released - the minimalist ORM and fluent query builder for PH
February 27, 2013 @ 10:33:33

Simon Holywell has a new post to his site about a project that aims to be a minimalist ORM library and make it easier to built queries on the fly for your applications (and is installable via Composer) - the Idorm + Paris combination.

Idiorm is a PHP ORM that eschews complexity and deliberately remains lightweight with support for PHP5.2+. [...] However, having said this, Idiorm is very powerful and it makes most of the queries PHP applications require pain free. Some of these features include fluent query building, multiple connection support and result sets for easy record manipulation. Paris sits on top of Idiorm to provide a simplified active record implementation based upon the same minimalist philosophy.

He includes examples in the post of both queries with Idiorm - simple things like creating and finding records - and using Paris to make models out of PHP objects. He also talks some about the current state of the project, recent advancements and some of the things they're looking to do with it in the future (including dropping PHP 5.2 support and use late static binding).

0 comments voice your opinion now!
library project orm idiorm paris activerecord simplicity


Fabien Potencier:
Don't use PHP libraries with known security issues
February 20, 2013 @ 10:54:20

In his latest post Fabien Potencier introduces a new effort to help PHP developers using Composer for their dependencies find potential security issues automatically - the security.sensiolabs.com site.

I want to provide a simple and efficient way to check for vulnerabilities in a project and I want to serve more than just the Symfony community. That's why I'm really proud to announce a new SensioLabs initiative: a simple way to check if your project depends on third-party libraries with known security issues. The website explains how it works in details (https://security.sensiolabs.org/), but basically, this initiative gives you several ways to check for security issues in your project dependencies based on the information contained in you composer.lock file (you are using Composer to manage your dependencies, right?)

Composer users can upload their "composer.lock" file and the system will evaluate it against the vulnerabilities it knows about and return any issues it might find. The current database is hosted on github and can be added to by anyone using a pull request. Additionally, you can install the command-line version if you want to do checks locally.

0 comments voice your opinion now!
library security issue sensiolabs database checker



Community Events











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


zendframework2 testing code release interview language unittest functional opinion phpunit framework example community development series application tool podcast object introduction

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