Tagphp

PHP: More on Users

Still working on that User class I wrote about a couple of days ago and yeah, I’ve got some major changes, that increased the class usability and probably flexibility. I posted my thoughts in the comments for that post, and got some positive mail, ICQ and Twitter feedback on those ideas. The original comment said: Alright, I reconsidered the meta data storage concept, cause it’s not always...

PHP: The User Class Snippet

Okay, this is gonna be fun. I just finished my own version of the User class in php. I know there are millions of others around, but I didn’t find one that would suit my project – they’re all too complicated and unflexible. I’ll start off by explaining some of the requirements and a couple of examples. I’ll introduce you to the class at the end. I had to slice the...

PHP: Logger and Timer Snippets

Hey. I’ve just started writing my simplest classes for a new content management micro-system in php, and I’d like to share some moments with you. These classes will probably be good for php noobs out there struggling in the world of object-oriented programming – go for the basics. The Logger class is just a text logger with simple functionality good for logics debugging. The...

WordPress – Social Networking

I’m currently building a tiny social network for vector artists to post their artwork and get feedback. Anyways, I’ve been doing that for almost a year already and still can’t get it finished :) I’ve got design, I’ve got code concepts, but it’s all too complicated for a one-man-team. So this is where wordpress comes in… I’ve tried the WordPress MU...

NetBeans IDE 6.5 RC2

I’ve finally got a chance to run the new NetBeans IDE (I’m talking about the “Early Access for PHP” version). I’ve been running 6.1 ea-php for quite some time now. I haven’t had problems with 6.1 on my Fedora 9, but my Windows XP distro sucked at running NetBeans 6.1, and that’s bad cause I have to use Windows at work. I’ve been experiencing...

Simple Watermarking with PHP

Here’s a pretty code snippet for watermarking images with php. <?php header('Content-type: image/jpeg'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg('photo.jpg'); $size = getimagesize('photo.jpg'); $dest_x...