If you’ve ever used opera or other browsers like konqueror then I’m sure you like the way you can search from the address bar by typing a custom shortcut and your search query. to search for ‘Premium Bonds Checker’ on google using Opera I’d just hit F8 (to get to the address bar) and then type ‘g Premium Bonds Checker’ and hit return because g is my shortcut for searching google.
This morning after I finally found it I checked my Premium Bonds holder’s number to see if I’d won (better luck next month). I thought to myself wouldn’t it be nice if I could tell Opera to check my holder’s number for me without having to go find it once a month.
The way I did it was to edit one of Opera’s custom search records. In the old versions of Opera you had to find and edit ’search.ini’ but the newer releases have a search editor built in. You can find it under preferences (Ctrl+F12 on Windows or Cmd + , on Mac) search should be the third tab. Edit or add a new search engine and give it whatever name and keyword you like then expand the details section and set the address to;
http://www.nsandi.com/products/pb/haveYouWon.jsp
A quick look at the source code for that page reveals that the form is submitted via post so you’ll need to check the ‘Use POST’ checkbox. The next choice you have is whether or not you want to always check a specific number, like me, or whether you want to be able to enter different numbers.
I chose to always check the same number which means I gave my holder’s number to opera and it will be stored in plain text on my computer. I’ve traded off the possible risk of someone accessing my holder’s number against not having to remember it when I check my premium bonds. You should make your own mind up.
Query strings:
- To always check the same number
- holderNumber=XXXXXXXX&null=%s
- Where XXXXXXXX is your holder’s number
- To check a user supplied number each time
- holderNumber=%s
%s is what opera uses in query strings to represent the input of the user. In the Google example above the terms ‘Premium Bonds Checker’ would have been represented by %s in the query string. holderNumber is the name of the form input (textbox) that the user would normally type their holder’s number into.
The first query string tells the premium bond checker to check your supplied holder’s number. There must be a user supplied input to these searches though (represented by %s) otherwise they wont work so a second parameter in this case ‘null’ is set to the user submitted string. The second query string tells the premium bond checker to check whatever holder’s number you supply.
How to use these methods:
Use the custom search like you normally would typing in one of the following depending on how you decided to set your custom search.
- Checking a defined number
- nsi xyz
- where nsi is your chosen search engine key and xyz represents any non-blank input
- Checking a supplied number
- nsi XXXXXXXX
- where nsi is your chosen search engine key and XXXXXXXX is your holder’s number
Now you have a quick and easy way to check your premium bonds without hassle, enjoy!

July 19th, 2009 at 3:15 am
emm… really like it
April 7th, 2011 at 3:18 am
I simply like this topic,such a great share.