skip navigation

www.Hilands.com


Content:: PHP

PHP
Last Modified: 2009-10-27
A small collection of classes, functions, examples, and small projects.

Table of Contents
Array Strip Slashes
Array Strip Slashes is nearly identical to the php function stripslashes except it recursively goes through arrays.
Read More...

arrstripslashes.inc.20060201.zip
Download 1,576 bytes
MD5 - baeb84483a4c2fadf9cd3eada5d29bed *arrstripslashes.inc.20060201.zip
BB Code to HTML
Original Code concept and over 90% of the code from http://elouai.com.
This will convert BB Codes ([b][i][url=""]) to HTML Code (<b><i><a href="">)
Read More...

bb2html.func.inc.2007122700.zip
Download 2,305 bytes
MD5 - f02621187ef8381b4f5b85fad82b1edd *bb2html.func.inc.2007122700.zip
Benchmark Timer
Three functions to determine your script time. Set start and end timers with benchmark_time() and calculate the time between with benchmark_calculate()

benchmark.inc.2005121800.zip
Download 1,845 bytes
MD5 - 5dc88c42775c48ac6bc5923f3e86be1e *benchmark.inc.2005121800.zip
Convert Smart Quotes
A simple function to take a string of input and replace the "Smart Quotes" with HTML Special Characters. If you have users that copy and paste from a microsoft word document this function will come in handy.

convert_smart_quotes.func.inc.2008031000.zip
Download 1,670 bytes
MD5 - 76929e66cce17390562a4f8bbd47815a *convert_smart_quotes.func.inc.2008031000.zip
Database Connectivity Class
Connecting to databases is simple in PHP, but the lack of error checking and messages can be a drag writing over and over. This class adds simple error messages or null returns. Ability to terminate program or continue upon error. Better yet theres one simple configuration file to be used with all your connections. Works with mysql and mssql (mssql with freetds).
Read More...

dbc.class.inc.2006053100.zip
Download 4,846 bytes
MD5 - 2fff65472e9c17abffdd18787bc7297c *dbc.class.inc.2006053100.zip

dbc_example.2008031000.zip
Download 6,828 bytes
MD5 - 16df4a10a9ec34f62d2a8225785c69d4 *dbc_example.2008031000.zip
Form Process Class
The Form Process Class takes static and dynamic form files in html format and does simple processing.
Included is a basic captcha security script from
http://www.white-hat-web-design.co.uk/articles/php-captcha.php
Read More...

View Example

form_process.class.inc.20091027.zip
Download 27,585 bytes
8301f164654d60b0f578e7af1b73351c *form_process.class.inc.20091027.zip
Simple Template Structure
Reads a "template" header, body, and footer and replaces special template tags with your content. E.G. [content] with your string. Simple bracket [] parsing.
This purpose of this script is to separate HTML code from PHP code. Allow the web page designers to work with the dynamic coders. The majority of the code in the template class will probably never be used, 90% of it was created for testing purposes to help me determine what could be used in a small production environment.
This script mainly uses pregmatch to replace strings surrounded by [] with html content from a file. This script can easily be modified to pull data from a database or any other content source.

tpl.class.inc.2006061500.zip
Download 3,222 bytes
MD5 - 36ebe0d2006d94c408ebe2ad4cce869f *tpl.class.inc.2006061500.zip