OK, the script is running without any flaws that I can see. I have made one final change. The change is in how the script checks the reffering domain. It was checking to make sure the domain matched the domain in the key, ie ('www.valorcorp.com') matches the url calling the script ('http://www.valorcorp.com/foo.asp'). I noticed some of you have many different subdomains. ie 'store.valorcorp.com', 'cart.valorcorp.com', etc. I have now made the script check just the domain ('valorcorp.com') so it doesn't matter what the sub domain is or if there is one.
I think that does it. You can now start using it. If I get a chance this weekend, I will put to gether some final documentation. But I really want to get to work on the real api that will really have some interesting uses. Thanks to everybody that helped with feedback.
Ben Newton