Page redirect in PHP

The header() function can be used to send a new HTTP header to client, so to redirect it to a new page. Example is: Alternately JavaScript can be used within PHP or HTML code to do the same:

How to check client IP address in PHP

We can use $_SERVER variable to check the IP address. For example, $_SERVER[“REMOTE_ADDR”] would return the client’s IP address. $_SERVER variable is an array containing information such as script headers, paths, and locations.