PHP Code Snippets


02 November, 2016   

A PHP template for dealing with any sort of error

if client is on shared internet, returns true if client is not on shared internet, returns false

30 April, 2016   

So better not to do, because the invisible fields are not needed for the binding form of validation of input data, etc.

This example code showing how to use PHP Functions to clean User Input

28 January, 2016   

MD5-based block cipher (MDC-like), which works in 128bit CFB mode.

13 October, 2015   

This function removes all duplicated lines of the given text file.

30 August, 2015   

Loads the contents of a dir an sorts them by the date of creation.

Two simple functions to read an write tab seperated files (like CSV files, etc).

01 July, 2015   

Loads and saves a compressed dump of an array

14 June, 2015   

This function helps you checking a UNIX timestamp with human readable time formats like 1m, 2d or 4y.

PHP’s rmdir function does not allow the deletion of a folder if it is not empty.

27 May, 2015   

A very common task is converting a number of bytes into something for human digestion.

26 April, 2015   

Recursively determines the size of a directory

19 April, 2015   

Merges two strings in a way that a pattern like ABABAB will be the result.

05 April, 2015   

A simple PHP script that outputs data into formatted columns.

01 April, 2015   

PHP code example for using the array_walk function to format an array.

11 March, 2015   

PHP code shows how to upload images into a mysql database using

Internal Mail System or private messaging system. Easy to embed into your own projects.

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.