Cooking on gas now!
For UK you need to change about line #77:
$address1 = "http://rcm.amazon.com/e/cm?t=";
to:
$address1 = "http://rcm-uk.amazon.co.uk/e/cm?t=";
And about line #79:
$address3 = "&o=1&p=8&l=as1&asins=";
to
$address3 = "&o=2&p=8&l=as1&asins=";
This will vary from country to country I think, examining the HTML Link the associate interface gives you will reveal the correct codes!