I believe 'connection reset by peer' means that the remote machine (in this case Authorize.net) has closed your connection. It could happen for a variety of reasons:
other server too busy
network congestion causing a timeout
* ordinary behavior results in the socket closing and you keep trying to write or read to/from it.
Using fsockopen to connect to sounds like a real chore to me because fsockopen is a really low-level function which has no understanding of what kind of protocol might be expected by the server on the other end of the socket. There's usually a lot of handshaking and stuff at the socket level.
cURL on the other hand understands a variety of protocols. It's quite easy to POST form data to a remote page and return the result in a string. cURL also lets you specify a cookie file or set up a curl_multi_exec situation where you can make dozens (hundreds?) of simultaneous requests. It's much more full featured.
You might also look around for a PHP/authorize.net framework.