PHP class for handling URLs