Subscribe
Social
/dev/random (Tumblr)
@LukeMaciak (Twitter)
+Luke Maciak (Google+)
Community
- /fun (forum)
- /code (forum)
- terminalists (steam group)
Tag Archives: php
Writing a Minimalistic MVC Framework in PHP
This is an outcome of a conversation I had recently. Apparently saying that MVC is a fairly simple concept is some sort of blasphemy. But it is. You really don’t need to use the almighty RAILS or a rails like … Continue reading
PHP: File Download Script – Straming Binary Data to the Browser
I don’t think I have posted this snipped of code here yet. It is old as hell, but I use it all over the place lately so I figured I just post it here for future reference. The script below … Continue reading
WIMP or WAMP?
For the past few years I have been running some software on a WIMP stack. They have been working quite well. I never had any issues with the technology stack itself. Or rather the only issues I had at times … Continue reading
Design by Contract in PHP with Assertions
Recently I wrote about meta programming in php because my recent project involves quite a bit of it. I will probably write about it at some other point but it’s still in sort of early development stage. However while these … Continue reading
Metaprogramming in PHP
Not so long ago I wrote about few meta programming tricks in Javascript. These are really powerful programming techniques that let you create elegant frameworks with generic code that adapts to your needs at runtime. But Javascript is not the … Continue reading
URL’s In Printed Media
I was reading an article in a magazine last week and while I don’t exactly recall the magazine or the topic right now I distinctly remember mild annoyance at the editor’s decision to put list of URL’s at the end … Continue reading
Generate Outlook Calendar Events with PHP and iCalendar
The internal web application at my company tends to send out a lot of email notifications. Some of them are reminders about various deadlines. Recently I got a feature request to allow people to add these reminders as events to … Continue reading
Sending Emails With Attachments via PHP
If you ever played around with the native PHP mail function, you will probably know that it’s functionality is very basic. Plain text emails work great, but if you want to do HTML email, you need to figure out what … Continue reading
Word Cloud in PHP
Word clouds (or tag clouds if you will) are one of the interesting methods of visualizing textual data that got popular recently with the emergence of tagging, ad success folksonomy sites such as Flickr, del.ico.us and etc. One of the … Continue reading
Writing Your First WordPress Plugin
I never wrote a wordpress plugin before, so when I set out to learn how they work, I was surprised to see how easy it is to create one. One would think that there would be lot’s of setup and … Continue reading
PHP: Export Query Results to a CSV File
Printing out nicely formated tables in HTML is good, but the downside is that sorting and aggregation options can be sometimes limited. If you didn’t write the code for it, your users won’t be able to do it. This is … Continue reading
Komodo Edit 4.1
I just discovered Komodo Edit from ActiveState (the same dudes who make that windows based Perl Package. Review Time! Komodo Edit 4.1 product My new favorite PHP editor. What is it? Komodo Edit 4.1 is a lightweight IDE with support … Continue reading
PHP4 Mail Function: Sent Time is 1 Hour Ahead
I have been messing around with this all morning and I can’t figure it out. Is there something wrong with the mail() function in PHP4? No matter what I do, all the emails sent by my PHP scripts appear to … Continue reading
DST Readines Test for MySQL and PHP
Here is a quick and dirty way to see if the “MP” part of your LAMP or WIMP solution is ready for the DST time change. I tested all the production systems here today, and they seem to be working … Continue reading
MySQL: How to get the key of last inerted row in PHP
I like to let MySQL generate unique keys for most of my tables by making them numerical and using the AUTO_INCREMENT feature. It is both an easy and convenient way to deal with primary keys. It has one disadvantage though. … Continue reading
PHP4 Static Function Calls
I just noticed that PHP4 does not support any scope modifiers such as static and visibility modifiers like private and public on class members and methods. PHP5 supports all 3, and it took me a several minutes to figure out … Continue reading