Posts tagged PHP

Protecting Files Against Hotlinking with PHP, Lighttpd, Apache & X-Sendfile

I recently had to lock down some important files that first required some level of authentication. The problem was the only way to guard against hotlinking or direct access to these files was to pipe the data through php after an Auth check. Using fread,... [+]

Stay Out CakePHP Component

Stay Out CakePHP Component

I have recently been developing a new website which has found me in the position of writing a lot of session handling code. I came across the concept of logged out all sessions across multiple instances, and out came this CakePHP session flushing component stay... [+]

Picking up where strtotime() left off

I was working on a project where dates were being calculated (sort of) based on user input. For example the user was able to type in “Next Saturday” or the “Second Sunday of the Month”. This wouldn’t really be sortable, as strtotime doesn’t exactly allow... [+]

CakePHP & Caching Until a Future Post

We had implemented a caching system for all find, pagination and pagination count methods with CakePHP. You can find a post on this here. The cache was expiring after every hour, however we failed to realise something. Our CMS system that we built allows posts... [+]

Pagination Caching With CakePHP

Pagination Caching With CakePHP

A site i was working with was using pagination quite extensively with lots of records and associations. This was producing unnecessary high load on the database and wait times on the production site. Caching had to be done. Unlike normal returned data from finds etc. Paginated... [+]

What's Been Doing?

What’s Been Doing?

Well it’s been a long time since I’ve posted pretty much anything on my pages of wisdom here. Which pretty much indicates that I’ve been busy. Very busy, and loving it. I’ve been buried in books and code. My previous employer got me back off... [+]

CakePHP URL Shortener Service Tutorial

If you have just woken up from a 10 year long coma, you might realise that the internet has been dumbed down to 140 characters and services that offer “URL Shortening” are quite widely used. Well today, coma awakened or not, I will be writing... [+]

PHP Jedi Wanted

PHP Jedi Wanted

My CakePHP Learning Experience

I first got into CakePHP roughly 3-4 months ago. It was a result of me dropping the Python & Django books and running back to the PHP world, which I was already familiar with. I simply didn’t have the time to wrap my head around... [+]

My CakePHP Category Tree Helper

Hey everyone. Not so much a tutorial here, but more so a snippet of code to help some of you out. My problem was with the CakePHP tree component. The way that the tree organised data in CakePHP works is through establishing a neighbour like... [+]

CakePHP Manual: People with no internet

My net is capped at a lame speed of 6kbs. That’s what happens when you try to enjoy content on the internet and live in Australia. So when i’m trying to get some documentation for my CakePHP project i end up waiting like 5minutes for... [+]

My First Contact With CakePHP

My First Contact With CakePHP

If you have been reading the blog lately you will of noticed that I have changed my development path from Django using Python to CakePHP, tada, using PHP. I spent quite alot of time attempting to elarn both Python and the Django framework together. Much... [+]

CakePHP: Using Apress & Packt

CakePHP: Using Apress & Packt

I love buying books. Taking one look at my bookcase makes this quite obvious. I do have quite a large selection of computer related books. I find that by reading into the subject matter, especially for programming, before acting on ideas or tasks provides a... [+]

Site I'm Working On

Site I’m Working On

Coming Soon, Built with CakePHP

Using CakePHP Elements &...

Using CakePHP Elements & RequestAction

This problem arose while i was trying to get a random phrase from a database into the <title> HTML elements across all views. Being fairly new to CakePHP i was overwhelmed by some people’s solutions to accessing models site wide. However they forgot what CakePHP... [+]