you should look on http://php.net/manual/en/curl.constants.php for the error codes, not on the linked official curl doc. some of the error codes are different, at least the one mentioned on the other page:
in PHP the curl error number 28 is called
CURLE_OPERATION_TIMEOUTED
while in the official site is:
CURLE_OPERATION_TIMEDOUT