PHP 5.3.0 introduces two new error levels named as E_DEPRECATED and E_USER_DEPRECATED. The E_DEPRECATED error level is used to indicate that a function or feature has been deprecated. The E_USER_DEPRECATED level is intended for indicating deprecated features in user code, similarly to the E_USER_ERROR and E_USER_WARNING levels. The following is a list…
String Validation Validate name, surname by the below function to restrict only letters and spaces. Validate numeric value by the below function to restrict only numbers,you can uncomment any line according to your need. Alphanumeric Characters Validation Below function validates alphanumeric characters.ctype is complete function library in PHP. Validation for URL Exist or not This…
Set file permissions with .htaccess, this is a great method for ensuring the CHMOD settings for various file types. Apply the following rules in the root .htaccess file to affect all specified file types, or place in a specific directory to affect only those files (add/update file types according to your needs) Require SSL…
Get live currency rates in PHP & conversion using APIs In the below method, we get live currency rates from Google. This function uses CURL so make sure you have enabled curl extension in php. Google has an inbuilt calculator which can also be used for converting a currency into another.Doing so is really…
The twitter updates are always short – under 140 characters each. Plus, one can post updates and follow her friends using the Twitter website, software on his browser, a mobile phone or instant messages. People aren’t tied to one device. This makes the twitter so popular. It has grown far beyond its microblogging roots to become…
Block access to files using htaccess 1. Block access to .htaccess file Add the following code block to your htaccess file to add an extra layer of security.Any attempts to access the htaccess file will result in a 403 error message.Your first layer of security to protect htaccess files involves permissions via CHMOD to 644.…