To encapsulate the repeated fsockopen() code. This gives us a chance to control the timeout in one place: Raise it to one second.