replaces get_headers function with appserver php ext function