Getting real client IP address in PHP

Many times we need the visitor’s ipaddress for validation, security, spam prevention, etc. Getting the Visitor’s ipaddress is very easy in PHP. The simplest way to get the visitor’s/client’s ipaddress is using the $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘REMOTE_HOST’] variables. The variable in the $_SERVER array are created by the web server (like apache) and we can use …

Getting real client IP address in PHP Read More »

more .htaccess tips

In my previous post .htaccess tips I had started with what is .htaccess file and some things that can be done using it. In this post I’ll cover more about .htaccess files. Topics Covered: Directory index file Redirection Preferred domain (www or non-www) Redirect old site to new site Redirect all files in a directory …

more .htaccess tips Read More »

.htaccess tips

Topics Covered: What is .htaccess file? When to use .htaccess file? Disadvantage of using .htaccess file Authentication using .htaccess file Custom Error Document Allow/Disallow Directory Listings What is .htaccess file? .htaccess file is used on Apache Web Server to make configuration changes on per-directory basis. This file contains the configuration directives and are applied to …

.htaccess tips Read More »

Cachebuster code in JavaScript

The JavaScript, CSS and other files used in a website are often cached by the browser. Sometimes we might want the browser to always fetch the file from the server instead of from the cache. To do this we can use a cachebuster code to make the browser think that every time it is fetching …

Cachebuster code in JavaScript Read More »

Tools for Web Development

With so many tools available for Web Development its hard to find the right tools for the job. In this post I will mention some of the tools that I personally use for Web Development. Also, I will give links to some websites which can be really helpful for certain tasks like regular expressions etc. …

Tools for Web Development Read More »