Unfortunately, i can’t help you. I just want share the same problem.
I can’t even use CURL lib, neither sockets. Since the data of stats is always sent to WP server, i think there’s no workaround to do it without curl or sockets.
I tried a search and found this:
https://lorelle.wordpress.com/2007/02/12/counting-wordpress-statistics-wordpress-plugins/
Maybe some of those extensions work with you. Good luck.