Home

Latest happenings from my blog

View All Posts In My Blog »


CakePHP Locale and Routing

0 Comments

CakePHP

When I was working on the cakephp localization ( l10n ) and internationalization ( i18n ), I came across a problem so I decided to let the world know about it if anyone had got the same issue.

What we want here is that a user can go to the localized version of the website according to the URL identified, for instance we want the website to load the English locale when we pass a URL like this http://example.tld/eng/Controller/Action

The problem is that while implementing the routes for the language detection, the plugins made a conflict with the rules in the routes file. Language routing is easy but sometimes can be tricky.
Read more…


PHP Variable Variables and Variable Constants

1 Comment

In this small article I’ll illustrate PHP’s variable variables and Variable constants. There is no variable constants in PHP but I’m introducing a methodology to implement the same approach and achieve the same functionality as variable variables.
Read more…


PHP: get and set custom HTTP headers

0 Comments

In this short tutorial I will illustrate how can you send and read custom HTTP headers using php.

First let’s start by sending a custom HTTP header to the server. I will be using cURL library to send HTTP requests.

Read more…