Hi all,

I intend to code up a quick script to run from cron each month to look up a Premium Bond holder's number on the NSandI lookup page[0] to find out whether that holder's number has won a prize or not, and thought I may as well release it to CPAN as a small module.

I'm thinking Finance::PremiumBonds or something similiar - any better suggestions?

It'll offer a very, very simple interface to start - something like:

if (Finance::PremiumBonds::has_won($holder_number)) {
    # we've won something
}

Unless I can get National Savings + Investments to give me details of each response their site gives (probably unlikely) I think it'll have to be restricted for the simplicity of looking for "not this time - better luck next month" in the response, and assuming that the presence of that phrase means no win, but a successful response without that phrase means we might have won (or they might just have changed their website copy - the joys of screen-scrapage).


Cheers

Dave P

[0] http://www.nsandi.com/products/pb/haveYouWon.jsp

Reply via email to