PHP - kez dışarı fsockopen zaman bilmek için bir yol var mı?

1 Cevap php

I was wondering if anyone knows a way to know when fsockopen times out? For instance if I set the timeout to 5 seconds, can I define a handler to do something if it hits that timeout connecting to my server?

teşekkürler

1 Cevap

Kimden man page:

If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket.