Update server.php

Fix undefined offset error occuring when headers of server couldn't be retrieved