Hm ok.
So the problem is that you see the response in the browser, while you need it in a string so you can redirect to it with PHP. Right? I think curl will be a good solution here. So instead of a form, you simulate the get request with CURL. Then you get the response in a string and then you can apply my code. Something like:
<?php
$ch = curl_init();
# Fill out your form parameters in the string below
$queryStr = sprintf(
"?CustomerID=%s&UserName=%s&Amount=%s&etc=%s&etc=%s"
$CustomerID,
$UserName,
$Amount,
$etc,
$etc
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://nz.ewaygateway.com/Request/" . $queryStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
preg_match('/<URI>(.*)?<\/URI>/', $response, $match);
header(sprintf("location: %s, $match[0]));
?>