I have a script that is using curl and so parses content from another server. However it sometimes takes some minutes for the outbound server to be loaded within curl.
As the other server is slow I was thinking about setting a timeout in my php script which should print an error if it takes let's say more than 20 seconds to load the page curl wants to.
How to do that?