PHP5 WebSocket Example – A Simple Chat

The classic example for websockets is a chat. This chat example has only 200 lines of code (excl. the Websocket class), is really easy to understand and customizable.

Read the rest of this entry »

Der Erklärbär: Aspect-Oriented Programming mit PHP – Teil 1 – Signal Slot

Wiedermal was Neues!? Wiedermal wird die (Web-)Programmierer-Welt auf den Kopf gestellt!? Objektorientiert ist gelber Schnee von Vorgestern, Design-Patterns verwendet heute schon deine Oma fürs Putzen … und jetzt kommt: TaTaaaa! AOP – Aspect Oriented Programming.

Der Erklärbär erklärt’s! (er versucht es zumindest)

Read the rest of this entry »

New Google Ranking Checker with Locale-Support

A new release of the Google Ranking Checker Class is available now. The new version 1.2.0 is released under a Creative Commons license (by-sa 3.0) and supports locale settings for language and country.

Read the rest of this entry »

Mount Amazon Ec2 with Mac OSX

MacFusion is a free OSX app for mounting FTP and SFTP (SSH) drives into mac finder. Usually you use a user/password combination for authentification but if you want mount an amazon ec2 instance you have to use the pem-file you get here.

Read the rest of this entry »

MySQL/SQL: count chars in table field

SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table

PHP Websocket Class new Version

Auf Anfrage einiger Leser habe ich jetzt die Klasse kommentiert und Informationen zur Lizenz hinzugefügt. An der Funktionalität hat sich nichts geändert. Die aktuelle Version 1.0.5 ist unter folgender URL zu finden: http://bohuco.net/labs/php-websocket-class/lib/WebSocketServer1.0.5.php.txt

Read the rest of this entry »

News Update for Web-Developers – Week 44

Read the rest of this entry »

Javascript Array Case-insensitive Sorting

easy if you know how …

 
myarray.sort(function(a, b){
    return a.toLowerCase() > b.toLowerCase();
});

WordPress Quicky: Query Posts by Custom Meta Field

If you have already added a custom meta field to your wordpress posts with add_meta_box you probably want to query such posts in your template. You can do that with query_posts(), it supports the meta_key and meta_value attributes.

 
query_posts($query_string.'&meta_key=onStartpage&meta_value=1');

WordPress Quicky: Add User Profile Fields

If you want add fields to the wordpress user profile then two hooks are important for you.
Read the rest of this entry »