Denny or allow access for IP ranges

We can block a single domain or a complete range such as entire countries. deny from 99.1.0.0/255.255.0.0 To allow Range of Multiple Ip address: allow from 99.88 99.88.77 11.22.33 Place these code in .htaccess

Automatically CHMOD various file type

Several sites have been harmed due to improper permissions. This interesting hack gives the site a semi-auto healing mechanism. Warning: Your mileage may vary. {code type=PHP} #Ensure CHMOD settings for specified file types # remember to never set CHMOD 777 unless you...

Encode and decode URL

In PHP you can send values by encoding and decoding the URL by using this encoding and decoding method. {code type=PHP}echo base64_encode(‘I am encoded PHP’);{/code} You will get and output something like this. {code...

How to get image size dynamically

There are many times you wonder why the w3c validation is not going through for you. Please make sure that the img tag has the width and height attributes. What will happen if the image file comes dynamically and you do not know the width and height attribute, in that...
PHP: Hypertext Preprocessor

PHP: Hypertext Preprocessor

PHP is a powerful scripting language, which is best suited for server side web programming. There are plenty of modules in PHP like session, cookies, post, files etc that make its to be a versatile scripting language. It is also well known for its flexibility. The...