phpbrowscap - Browser Capabilities PHP Project

PHP's native get_browser() function parses this file and provides you with a complete set of information about every browser's details. But it requires the path to the browscap.ini file to be specified in the php.ini browscap directive which is flagged as PHP_INI_SYSTEM. That means in most shared hosting environments you cannot edit the php.ini file.

Browscap is a standalone class for both PHP4 and PHP5 that gets around the limitations of get_browser() and manages the whole thing. It offers methods to update, cache, adapt and get details about every supplied user agent on a standalone basis.

Sometimes you need to visit some project site to read about simple php functions like "get_browser()"

Filed under  //

Comments [0]

10+ WordPress plugins for developers

I like Wordpress a lot, but showing some code snippets in your code tutorial is sometimes a hard job. This blog show some solutions to make the developer's work much easier. There is one plugin missing on his list: WP-Syntax

Filed under  //

Comments [0]

The Slow Death of PHP 4 | BrandonSavage.net

The truth is that there are lots and lots of hosts that are still on PHP 4. There are still lots and lots of lines of PHP code that make use of PHP4-level features (see Wordpress and Drupal for examples). My complaint is that PHP 4 has been officially unsupported for the last year now, and PHP 5 has been out for over five years. Five years! That’s a long time to wait to take advantage of new features in the language.

Sadly, developing for PHP 4 backwards compatibility is something that companies and individuals are still doing. Wordpress released a new Widget API in version 2.8 that relies on the old-style PHP 4 constructor. Apparently, for Wordpress and many other developers, wide adoption is more important than language improvements.

Changing your coding style is a long process :( Sure my coding style is these days much more PHP5 than a few years ago but I'm still in progress to write powerful OOP based classes for php5 or php6.
At least most hosting provider offering now php5 enabled plans.

Wordpress and PHP4
Yeah really bad I see even in new code parts a lot of old fashioned coding styles :(
I think that some people still provide code written for PHP4

Filed under  //

Comments [0]

Why PHP Doesn’t Suck

From its original design as a way to create dynamic web pages, PHP has evolved into a language (and supporting environment) that is particularly well suited to rapidly developing web-scale applications. Examples of these include Facebook and Wikipedia.

Unfortunately, its genesis prevented it from being taken seriously as an enterprise-grade language and environment, especially when compared to the incumbent 800 pound gorilla, Java.

PHP is great even if you don't use Zend framework or others. The best thing is that you don't need any development environment, just write code and run your script on a php enabled web host. No compilation no license costs just open source.

It will be interesting the next years how popular PHP becomes on windows...

Filed under  //

Comments [0]

PNG transparency in IE 6 with no extra HTTP reques

The rule below is read by IE 5 and 6, but the use of the escape character ("\") sandboxes the dynamic property for IE 6.
This CSS expression checks if the image is a PNG file, and if it is, it applies the filter and does the padding/height/overflow trick explained in my PNG overlay article.

Note that for this technique to work, you need to make sure that at least the width of the image is set, either via the markup or CSS.

* html img {
  behavior: expres\sion(
  (this.runtimeStyle.behavior="none") && (this.src.toLowerCase().indexOf('.png')>-1) && (
  this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='scale')",
  this.runtimeStyle.paddingTop = this.height,
  this.runtimeStyle.height = 0
  )
  );
  overflow:hidden;
}

Transparency and png are hard to handle if your website need to function in older browsers like IE6. This CSS example will help.

Filed under  //

Comments [0]