disable PHP Timeout PHP Snippet Db

PHP Snippet Db

write string to file 1.0

write string to file script allows you to write string variable to a text file.

switch integers 1.0

switch integers - php switch example

Upload File 1.0

Both the form and the data processer are on the same page. Configure the upload path and the max file size as per your requirements.
Source Code

search array find in array 1.0

search array find in array script searches an array to find a specific value.

return directory component 1.0

return directory component allows to find the directory componenet of a filename using the PHP function dirname().

disable php sessid in URL 1.0

//These commands must be set BEFORE the session is started

if else example 1.0

if else example is a basic example of an if then else control structure.

show referring URL 1.0

show referring URL script grabs the referring URL, get the HTTP_REFERER and save it to a variable.

format date to mysql datetime 1.0

format date to mysql datetime allows you to convert the current date and time to MySQL datetime format using PHP's date() function.

extract filename from a full path string 1.0

Useful for splitting a string path to get the filename.

read file to array 1.0

This simple PHP example shows how to read a text file into an array, with each line of the file as a seperate element.

simple form handling 1.0

simple form handling shows a very simple form together with the form handling process on a single page.

ImageThumb 1.0

Currently supported formats are GIF, PNG and JPEG.

simple email validation 1.0

simple email validation script validates an email address and returns TRUE or FALSE

safely display quotes and other special characters 1.0

safely display quotes and other special characters script uses the htmlspecialchars() command to convert all special characters in a string to "browser safe" versions.
This is useful for displaying double quotes in a form's textfield and ...

ban block IP addresses 1.0

ban block IP addresses gets the users IP address and exits the page if it matches a banned number.

find string 1.0

$pos = strpos($mystring, $findme);

send email 1.0

send email script allows you to send an email from PHP.

passing variables via url 1.0

Access these variables with the _GET command

check if a file or directory exists 1.0

This can also be used to determine if a directory exists.