I've checked the call_API function in the plugin and cross checked the URL it generates. It all works fine for me when I copy it into my browser, I get a serialised array returned.
Did this by emailing the generated url out from the plugin.
So call_API is working correctly, and my piwik installation is working correctly as it returns the string.
I checked get_remote_file function and that is where an empty result is being returned causing the error. I'm not sure why this is though. I see that the function should always return an array, even if it contains an error message, but it's not returning anything? Both cURL and fopen is enabled on the server.
I've tested the fopen method on my local machine and the server. It works fine on my local machine, but I get nothing returned when testing on the server, so my problem is potentially a server issue, but then the plugin tries cURL first. I don't know if the same issue could affect cURL?
As I said before, my piwik installation is on a subdomain. I don't know why this should make any difference though if the API is accessed using http
The mystery continues...