Thanks Flush. For some reason I had over-looked this function but in any case it's no good because the server my site is on is running PHP 4.1.2.
I can't find anyway to get 4.1.2 to do the job and fear you may be right that file_get_contents() is the only way to do this.
But because it seems a relatively simple task for PHP to perform, I can't help doubting that it took until version 4.3 to accomodate this.
Can someone with PHPv4.3+ check that this works:
echo $urloutput; //should print "N,-1,Cart id must be provided"
If so, I'll badger my host for a php upgrade.