This article originally appeared on www.phpfreelancer.org.

Sometimes you want to know in a simple PHP script what the current URL (the URL through which the PHP script is called) is. When I was looking for a solution without reinventing the wheel, I actually found no piece of PHP code that met my expectations. So let me try it as well.
Read more...