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.…
Definition of .htaccess Regex Characters & htaccess regular expression special characters # The # instructs the server to ignore the line. It is used for including comments. Each line of comments requires its own #. When including comments, it is good practice to use only letters, numbers, dashes, and underscores. This will help eliminate/avoid…