There might be another possibility: You could try fetching images with query strings in their URLs. e.g.:
<script>
var i = new Image();
i.src = "script.php3?a=" + var1 + "&b=" + var2;
</script>
You will need to encode the values appropriately if they might contain characters that don't belong in a URL.
It might be best to set up an appropriate Content type and dummy return data in the PHP script. This technique could also use the document.location member of a window (e.g. popup window). It might also be wise to ensure (using Expires headers) that the script URL doesn't get cached.