This is interesting.
So maybe the fsockopen is us using some type of DNS caching etc. Because getting the address with gethostbyname is slow anyway.
I mean:
$fp = @fsockopen('ssl://'.gethostbyname('www.microwallet.org'), 443);
is probably a mistake.
Maybe fsockopen is trying to use ipv6 instead of ipv4. Or issue with the openssl version.
Sorry I'm just a PHP coder, not a sysadmin etc. And it does not bug for me so don't have a playground to test what is wrong.
Maybe it is time to replace the fsockopen with curl functions. But I don't know if it will work for you either.