Ultimate Web Tips

your Wordpress, jQuery, PHP, MySQL, Linux and CSS guide to a successful website

Archive for the ‘PHP’ Category

February 14th, 2012

Connect with a public key to SSH with PHP

No Comments, PHP, by Joakim Ling.

Not a lot of people knows that PHP supports SSH. I use it to execute remote commands, auto configure of…

November 29th, 2011

Replace html tags with regexp

No Comments, PHP, by Joakim Ling.

Regular expressions are an easy way to match or replace pieces of your content, but can be tricky if you…

The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics…

November 9th, 2011

Zend studio performance issues (typing lag)

No Comments, PHP, by Joakim Ling.

One of the most common used IDE for PHP developers is Zend Studio for Eclipse. Great for lazy programmers as…

A lot of you have recently upgraded to PHP5.3, and one of the new things is the MySQL connection. If…

March 28th, 2011

PHP 5 and the singleton design pattern

No Comments, PHP, by Joakim Ling.

Ensure a class has only one instance and provide a global point of access to it. That’s called a singleton…

March 25th, 2011

Detect the color brightness with PHP

No Comments, PHP, by Joakim Ling.

A while ago I had a lot of background colors stored in a database. Rather then manually pick a text…

March 24th, 2011

Get all categories on current post

No Comments, PHP, Wordpress, by Joakim Ling.

A while a go I spent a few minutes trying to figure out the best way to get all categories…

There is a lot of ways to do this, but using the PHP5 built in SPL RecursiveIteratorIterator makes it simple…

March 15th, 2011

PHP headers

No Comments, PHP, by Joakim Ling.

It’s important to tell your browser what kind of information you are going to display, here are a few examples