PHP: Correct Hashing Passwords in PHP

I found this article about password hashing in PHP on Twitter and found a few serious points that are not fully correct in this article.

|Den ganzen Beitrag lesen...

PHP: Easy to use and secure PHP hashing Class

Why

I created this class because there are too many people still saving simple md5 instead of more secure hashes.
The class should be fully PHP4 and PHP5 compatible and very easy to use. But also extended usage on its complex methods is possible.

Example

The usage of the class should be straight forward.
If you just want to use it, use the methods hash() and check().
EXAMPLE:

$secure_hash = new secure_hash;
$hash = $secure_hash->hash('pass');
if($secure_hash->check($hash, 'pass'))
  echo "Password fits to hash.";
else
  echo "Password does NOT fit to hash.";

That is all you need to know for just using it, but i have to tell, you will miss something important if you stop reading here.

|Den ganzen Beitrag lesen...

Hetzner: Server with 24 GB RAM for 249€ per Month

For people that need a massive amount of RAM, Hetzner, a german quality serverhoster, has a special internal offer. It can not be found on their website (http://www.hetzner.de/), because it is a "request-only" offer.
There is a thread in the official Hetzner forum where they mentioned there has been some requests for such machines in the last time, so they asked what pricing model would be the best.

Current offer looks like this:
The current High-end Model EQ9 with 24 GB RAM instead of 12GB RAM.
http://www.hetzner.de/de/hosting/produkte_rootserver/eq9/

Original post:

benji:
ja, falls jemand aktuell eine Maschine mit 24 GB Ram braucht, und bereit ist 249 monatlich und 999 Setup zu bezahlen, kann er sich gerne an uns wenden. Günstiger ist es zu den aktuellen Hardwarepreisen nicht zu machen. (Preise sind wie immer incl. MwSt.)

Translated:

benji:
yes, if anybody needs a machine with 24GB RAM, and is willing to pay 249 Euro monthly and 999 Euro for setup, can gladly contact us. Any cheaper is not possible with current hardware prices. (Prices includes german VAT).

If you are interested, you can find a email for contact here:
http://www.hetzner.de/de/hosting/legal/impressum/

PHP: Create your own url shortener with this easy to use PHP Class

After using Twitter some time now, i saw several URL shortening services and a few scripts that would do the work. But i did not see any PHP Class for doing this job easily. So i wrote one myself ...

|Den ganzen Beitrag lesen...

Benchmark: APC vs. MySQL MEMORY fetching Speed

I once wrote a article about APC and MySQL MEMORY table caching and found out that APC needs very much memory compared to MySQL MEMORY. Now i did a short benchmark to check out the fetching speed of these two solutions with a interesting result.

|Den ganzen Beitrag lesen...

PHP: Best bugreport EVER!

This is the best PHP bug rebot EVER! Just read it:
http://bugs.php.net/bug.php?id=48669

|Den ganzen Beitrag lesen...

PHP: Benchmark isset() or array_key_exists() ?

The Twitter user caioariede postet that you should array_key_exists() instead of isset(). He did not say why so i tried to check performance first and came to interesting results...

|Den ganzen Beitrag lesen...

Piratenpartei hat Vorherrschaft in Twitter erlangt

Es geht langsam los mit dem Wahlkampf und den Vorab-Umfragen zur Bundestagswahl 2009. Eine Partei werde ich besonders im Auge behalten, die Piratenpartei oder kurz, Piraten. Diese Partei bringe endlich frischen und technisch kompetenten Wind in unsere "Was ist bitte ein Browser?" Politiger Riegen.
Doch wenn es nach den aktuellen Internetumfragen gehen würde die man inzwischen auch vermehrt auf Twitter findet, sollte die Piratenpartei die nächste Wahl haushoch gewinnen!
twitter_poll_piraten
Wenn dies mal nicht ein klares (Vorab-) Ergebnis ist. :)

PHP: foreach vs. while vs. for - The loop battle!

PHP has just one kind of array, it does not have separate lists, hash or maps, they are all combined in a "array". Iterating over such a array is a very common part so doing it wrong can lead to less performance.
In the following article i will do a short test which loop is the fastest.

|Den ganzen Beitrag lesen...

PHP: PHP 5.3.0 - Short Ternary Operator

With the Realease of PHP 5.3 have come very much little new details, on of them is the short ternary operator wich annoyed me for a long time because you have to use it with 3 subjects.
Before PHP 5.3.0 this was the only way it could be done:

$result = ($if == 3) ? $than : $else;

Now in PHP 5.3.0 you can write:

$result = ($if == 3) ?: $else;

There is one problem i see here.
I cant use this in my public projects because it will make my code >= PHP 5.3 dependent wich is NOT an Option. But this mixed with the fact that namespaces are now available with PHP 5.3, it will my namespaced code always PHP 5.3 dependent.