PHP __DIR__, __FILE__, __FUNCTION__, __CLASS__, __METHOD__, __LINE__, __NAMESPACE__

Updated by on Mar 31, 2011 in Featured, PHP, Programming | 1 comment

PHP has large number of predefined constants. This HOWTO will present the seven most important, most practical and most useful PHP Magic...

Read More

PHP: Calculate Real Differences Between Two Dates or Timestamps

Updated by on Feb 8, 2011 in Featured, Most Popular, PHP, Programming | 150 comments

I was using simple function to calculate difference between two dates and timestamps until I noticed, it’s not working correctly in...

Read More

cURL Tip: Check that the Apache Compression (gzip, deflate) is Working

Updated by on Oct 16, 2010 in Command Line Guides, Featured, Linux, Programming, Servers | 0 comments

This is a quick method with using cURL to check that Apache Compression with mod_gzip and mod_deflate is working. Only the remote server...

Read More

PHP CLI Colors – PHP Class Command Line Colors (bash)

Updated by on Oct 15, 2010 in Featured, Linux, PHP, Programming | 6 comments

PHP Command Line Interface (CLI) has not built-in coloring for script output, like example Perl language has...

Read More

PHP Timing Class – Class for Measure PHP Scripts Execution Time and PHP Web Page Load Time

Updated by on Jul 8, 2010 in Programming | 1 comment

In many cases, it is really useful to know the exact time for how long a PHP script is running or how long will take PHP web page load. On...

Read More

PHP stdClass to Array and Array to stdClass – stdClass Object

Updated by on Jun 17, 2011 in Featured, PHP, Programming | 22 comments

I think every PHP coders have come accross Arrays and stdClass Objects (belongs to PHP Predefined Classes). Sometimes it’s very...

Read More

nginx, PHP 5.3 and FastCGI on CentOS 5.5, Fedora 13, Red Hat RHEL 5.5/6

Updated by on Nov 16, 2010 in CentOS, Featured, Fedora, Linux, Programming, Red Hat (RHEL), Server Guides, SQL | 9 comments

This is guide howto install nginx, PHP 5.3 and FastCGI webserver with MySQL and/or PostgreSQL and Memcache support on Fedora 12 and Fedora...

Read More

BitLy (bit.ly) PHP Class – Shorten and Expand URLs (and Hashes) with BitLy API

Updated by on Oct 15, 2010 in PHP, Programming | 3 comments

BitLy (bit.ly) is a service which allows users to shorten, expand, share and track URLs (links). bit.ly can be accessed through bit.ly...

Read More

Format bytes with PHP – B, KB, MB, GB, TB, PB, EB, ZB, YB converter

Updated by on Oct 15, 2010 in Featured, PHP, Programming, Uncategorized | 1 comment

Simple PHP function that formats the bytes to the desired form. Possible unit options are: Byte (B) Kilobyte (KB) Megabyte (MB) Gigabyte...

Read More

PHP: Loop through dates (from date to date) with strtotime() function

Updated by on Oct 15, 2010 in PHP, Programming | 9 comments

This is very easy way loop through dates (from date to date) with PHP strtotime() function. This example only echo dates, but of course...

Read More

PHP Script to Generate PostgreSQL Table Partitioning (Part 2)

Updated by on Sep 7, 2010 in Programming, SQL | 1 comment

As Part 1 (Howto create PostgreSQL table partitioning) shows, making of PostgreSQL partitioning needs a lot of SQL commands. So this Part 2...

Read More

CSS compression with own PHP class VS CSSTidy

Updated by on Oct 15, 2010 in PHP, Programming | 2 comments

It makes sense to optimize the site’s cascading style sheets (CSS), as it pages load faster, and it reduce the amount of data...

Read More

Prevent the browsers to use old cached CSS and JS files

Updated by on Sep 9, 2010 in Programming | 0 comments

Browser cache is very useful when users download the same CSS and JS files multiple times. Some browsers, however, use the old CSS and JS...

Read More
Page 2 of 212
Bear