This all good but you will be caught sooner or later. I don't want to be the bearer of bad news but someone has to do it before someone gets banned from adsense. When you use the API you need to get your api code, and when you do that you agree that you will not be using the search for profit, further more you can;'t use the API in combonation with any other google programs...sooo, even if you put some other PPC links on the results page, Google may still nail you on the fact that it is generating a profit and using the Google API. If this isn't using google's api them im sorry and everything i just said was irrelevent and the script looks good so buy it. If it is Google API, I would suggest that U-P-L-O-A-D should pull data from another source.
P.S
U-P-L-O-A-D, I would be intersted in working on a project like this if you are interested we should talk.