Making dealing with headers more friendly in php