How to get client IP Address with PHP

Before we go any further, never trust data sent from the client. The most reliable value in PHP you can hope is $_SERVER[‘REMOTE_ADDR’] that contains the real IP address of the connecting party. But the client can be hidden behind a proxy server. The proxy...
How to convert string to date format in PHP

How to convert string to date format in PHP

In PHP there is an easy way to convert a string to date format. And it will work in all situation flawlessly. Problem Let’s say that we have this date in string format that we want to change to date format in PHP: $olddate = '2008-07-01T22:35:17.02'; Basic and...