Setting a timeout on file_get_contents for URLs

Just a quick post since this doesn’t seem to be very well covered, but could be useful to someone. PHP’s file_get_contents function is an easy way to load the contents of a file or URL into a variable. But what about timeouts?

continue reading

Kohana get a witness?

I’ve blogged in the past about building my own PHP framework. I’ve found little time to further this goal in recent months and so I started looking around for a good foundation to work from. I’ve used Code Igniter before, but it’s lesser known, PHP5-only, strict OOP fork, Kohana seems a better fit with my tastes.

continue reading

Base jumping with PHP

Since my last post, and yet another private self-promise to post on a more regular basis, with more interesting or in depth info than my previous rambles, I have managed to think of around 6 different post ideas, then forgotten about them. So in absence of depth or interest, here’s some code, instead. Or at least some writing abotu some code.

continue reading

What price my time?

For those outside of the world of web design/development, it can be hard to understand what we do. Why does it take so long? It’s only a website, right? But getting things just right, as with anything, takes time. Here’s an example of a lack of this appreciation.

continue reading

Hooks and Modules

Following on from the post where I vaguely mentioned building a framework, I thought I would get started on two crucial elements of it today, namely hooks and modules.

continue reading

But my nails are simply too pretty to get my hands dirty

I like writing code. Writing code, especially good code, takes time. As developers, over time we build up a stash of functions or tricks which we can re-use in future projects and this certainly helps to mitigate the cost in time, but this only goes so far.

continue reading