Using .htaccess 












Using .htaccess/.htpasswd Password Protection 


php5
php5
Coding Tips 






Uploads and Downloads 

php5
php5
php5
Mail 



php5


Working with Images 


Frequently Requested Website Functionality 
php5
php5

php5 see it on this page
php5








Using PHP 
php5
php5
php5


Website Managment 







php5

php5
Other Tips 







Replace banned words
This script will replace banned words in the string $message with an * for each letter. You can use this when receiving POST data with text input. In this example the banned words are in a text file called words.dat (in the same directory as the script) with one banned word per line.
<?php
$words_array = preg_replace("#\r\n?|\n#","",file('words.dat')); // read the file into an array and remove new line breaks (should cover all OS)
$word_stars = preg_replace( '/./','*',$words_array ); // replace every letter with a *
$words_array = preg_replace( '/(.+)/','#\1#i',$words_array ); // put # delim around each word
$message = preg_replace($words_array,$word_stars,$message);
?>