ZF2: ZF1 like URL Routing

ZF2 introduces a new routing for the framework which is similar to ZF1 but has slightly different semantics. The skeleton application ships with a default Application level router which takes a matching controller/action to /application/controller/action URI. If you wish to keep it backward compatible with the ZF1 type of matching, you may want to make the following changes to the module/Application/config/module.config.php file as below:

Zend Framework 1 Overview

Developing a PHP application requires domain knowledge, software engineering, discipline, and time. We rarely write applications from scratch as there are freely available application frameworks that we can take advantage of. For the PHP programming language, there are more than a dozen "popular" frameworks to choose from, and picking the right framework for your application is not a mundane task. I have been working as an IT consultant for many years, and Zend Framework is the one being discussed frequently. As a new PHP developer coming on board with a Zend Framework, I would like to use this forum to describe the learning process.

How to install Zend Framework 2 skeleton application?

For anyone getting started with Zend Framework 2 (or ZF2), the best way to get up and running quickly is by installing the Zend Skeleton Application available on GitHub. Here is the quick and easy way to get the skeleton application installed on a Linux machine. You'll install the skeleton application first, and then we'll install ZF2.

Trap spambots from submitting forms with honeypot and PHP

One of the duties of a webmaster is to prevent spam bots from submitting web forms. If spammers are not blocked, the data collected from the visitors will contaminated with spam and it's a real nuisance to clean out this data every so often. I have been researching ways to block spam on the web forms we have on our website and found a solution that works reasonably well.

How to retrieve Client IP address in PHP?

There are a number of array name/value pairs provided in the PHP's "predefined" $_SERVER variable, which you can use to extract client's IP address. Some of the IP-related $_SERVER parameters retrieved from the web server are passed by the client in the form of HTTP header, so they can be easily spoofed. Also, some of the HTTP_X_FORWARD* parameters expected to be filled by proxy servers may not always be there as not all proxy servers follow best practices.

How to edit Windows hosts file (C:\Windows\System32\Drivers\Etc\hosts)?

Windows users have trouble saving plain TXT files without extensions on a Windows machine. For example, if you have to edit C:\Windows\System32\Drivers\Etc\hosts file and save it as a plain text file, Windows will automatically add a .txt file extension to the file and save it as hosts.txt. Also, Windows does not allow you to edit the file directly in the system folder such as the C:\Windows\System32\Drivers\Etc.

[SOLVED] Outlook stripping newline character - Sendgrid

We've recently modified our e-commerce web application and replaced the native PHP mail functionality with a Phpmailer and SMTP. It was a pretty straightforward change, and we kept the mail format to "Plain/Text" format and changed the mail host to "smtp.sendgrid.net". After the change, we've noticed that the newline "\n" wasn't interpreted correctly and the mail we received was all garbled up. After some investigation, we found 2 things that needed to be changed to correct the problem.

How to publish a successful ebook?

I have been writing technical articles since 2004, but never really thought about monetizing my work until late last year. I own more than a dozen websites, and it really becomes hard to maintain all of them. In the 4th Quarter of 2010, I started selling advertisements on Web Hosting Resources, and IP Location websites and started generating a passive income from them monthly. Due to the time it takes to find quality advertisers, and running and maintaining an Ad server is somewhat troublesome I have decided to convert all of my Ads to Google Adsense. I have been running Google Adsense for nearly 8 months, and I am pretty happy with its performance as compared to other advertisement networks such as Adbrite and 3rd party networks.