‘PHP’ Archive

Toodledo API implemented in PHP March 29, 2010 5 Comments

I couldn’t find one, so I decided to write a PHP class that talks with Toodledo API. its not very well documented/commented, but quite simple and works well. Works on PHP5+ only. Uses the built-in stream wrapper for making HTTP requests (I’ll probably add support for requests with CURL and POST method too), and returns [...]

HTTP error 417 with PHP’s curl March 11, 2010 4 Comments

I’ve been getting 417 response codes (Expectation failed) while making requests with PHP/curl to tinyurl.com (I’ll probably publish that project here in a week or two). Well, its very annoying. took me some time to figure that one out. If someone else wonders about it, that’s the deal: If the content length (of the request [...]

My implementation of PHP Chainable March 2, 2010 No Comments

I needed a way to use method chainability on objects without having to modify the actual class (e.g. extending an Chainable class or implementing one) and without having to “return $this” on every method. I came up with, what I believe to be, an elegant simple solution – a generic approach that can be used [...]