Read CSS files with PHP

This function will open CSS file read it’s styles and separate selectors from property value pairs. The function stores the values in two array sessions (names and styles). The values can be then easily retrieved using loops or if/else statements.

Read More»

Using MySQL left JOIN and right JOIN

MySQL left or right JOIN can be very helpful and it refers to the order in which the tables are put together and the results are displayed. Left Join When using LEFT JOIN all rows from the first table will

Read More»

PHP class to get remote page title and description

This PHP class will help you get remote page title and description. Could be useful for automating link exchanges. PHP functions that are doing most work are: file_get_contents(); get_meta_tags(); class.metatags.php class metatags { var $title = ”; var $description =

Read More»

PHP visitor tracking script with jQuery and Raphael javascript library

This simple PHP visitor tracking script uses jQuery and Raphael javascript library to display daily hits to your page. The class features: IP filter (for IP’s you don’t want to track) Unique visits counter Raphael analytics (example on the bottom

Read More»

Drawing Shapes and Lines with PHP

Drawing shapes and lines with PHP is nothing like drawing with image editing program. Actually, when drawing with PHP you become the editing program. You use individual PHP functions to define colors, draw and fill shapes, re-size and save the

Read More»

Simple PHP/MySQL authentication/login class

Here is a simple PHP/MySQL authentication/login script (class) that is secure and easy to use. The class features: Login form Password recovery with basic email injection protection Optional md5 password encryption MySQL logon table creation MySQL injection protection Page password

Read More»

PHP Function to Generate HTML Table Using MySQL Database Data

Organize your MySQL database data in HTML tables created on the fly using this PHP function snippet. Function maketable uses MySQL query and an array of  columns you want to display as attributes. Function function maketable($query, $fieldarray){ //count number of columns $columns

Read More»

PHP/MySQL search engine script

Here is a quick tutorial/script to show you how to create PHP/MySQL search engine with search keywords displayed in bold. List of some PHP functions used: trim() -  Strip whitespace (or other characters) from the beginning and end of a

Read More»

Manipulating Strings with PHP

PHP provides many functions to manipulate strings. Here are some of the more common once. Getting the Length of a String strlen(s) – returns the length of the string specified as the argument $s = “Sample String”; $len = strlen($s);

Read More»

Add or delete HTML table rows from an .html file using PHP

Problem I worked on a PHP project where I needed to add and delete rows from an HTML table located in a simple .html file without any database support. The data for the table was provided by a web service.

Read More»
Page 1 of 212
© Copyright Emir Plicanic