Skip to content

Category Archives: PHP Programming

PHP Compiler – Encode Your Source Code

This is a pre-release of a program coming soon to help secure your PHP code. When used properly it should help protect your code from noobies and script kiddies.. more methods are coming soon to make decoding difficult for even the most saavy code thief. What it does: – Code jumbling (Obfuscation by code morphing) […]

Continue Reading: PHP Compiler – Encode Your Source Code →
The Most Used Web Programming Language

PHP is now considered to be the most popular web programming language. The biggest advantage is that, it is an open source platform. This helps in reducing cost and time for any web developing organization. Are you craving to build a website or a web based application that will not only give you a user […]

Continue Reading: The Most Used Web Programming Language →
PHP Coding Tools for Dreamweaver

Quickly insert control structures (if statement, etc.) and insert your custom PHP variables: no more typos! The free PHP Code extension for Dreamweaver helps to speed up code writing in two ways: * it inserts the chosen control structure (if statement, etc.); * it inserts the PHP variable chosen in the list of all variables […]

Continue Reading: PHP Coding Tools for Dreamweaver →
Page load time

Outputs the time in seconds that it takes for a PHP page to load.

Continue Reading: Page load time →
Number of days between now and a day in the future

This code will calculate and show how many days there are from the current date to a date in the future that you define.

Continue Reading: Number of days between now and a day in the future →
Connect to a MySQL database

A simple little function allowing you to connect to a MySQL database. * * You can then do your database queries */ // Edit your database settings $db_host = “localhost”; $db_user = “username”; $db_pass = “password”; $db_name = “databasename”; function db_connect() { global $db_host; global $db_user; global $db_pass; global $db_name; $connection = mysql_connect($db_host,$db_user,$db_pass); if (!(mysql_select_db($db_name,$connection))) […]

Continue Reading: Connect to a MySQL database →
Easy Way to List Directory Structure

$path = “/home/user/public/foldername/”; $dir_handle = @opendir($path) or die(“Unable to open $path”); while ($file = readdir($dir_handle)) { if($file == “.” || $file == “..” || $file == “index.php” ) continue; echo “$file”; } closedir($dir_handle);

Continue Reading: Easy Way to List Directory Structure →
Force a secure HTTP connection

if (!($HTTPS == “on”)) { header (“Location: https://$SERVER_NAME$php_SELF”); exit; }

Continue Reading: Force a secure HTTP connection →
Get the date

If you want to know how to get the date easy with php. Here is example: $today = getdate(); $month = $today[‘month’]; $mday = $today[‘mday’]; $year = $today[‘year’];

Continue Reading: Get the date →
Easy Way to Optimize Database Table

If you have a database driven site and you want to optimize database tables then this is perfect. It goes through all the tables in a MySQL database and does table optimization on each one using the MySQL Optimize Table syntax. dbConnect() $alltables = mysql_query(“SHOW TABLES”); while ($table = mysql_fetch_assoc($alltables)) { foreach ($table as $db […]

Continue Reading: Easy Way to Optimize Database Table →