问题描述:

How can I validate that a BSB number is a valid Australian BSB number?

Is there a way to programatically type in the BSB number into http://bsb.apca.com.au/public/BSB_DB.NSF/publicBSB.xsp and see if the response has success or something?

网友答案:

To answer the question as asked: Yes, you can automate the filling of a web form and the clicking of a button. No, it's not worth the hassle of deconstructing their ajaxerific1 web form.

The better solution would be to just grab the raw data from the ACPA FTP server, and validate using that information. The files are conveniently available in TXT and CSV format. (At a glance the TXT format looks like it's tab-separated, but don't hold me to that.)

Alternatively you could click on the download BSB files link, which gives you the option to download the entire directory in one shot.

If I were developing this, I'd use the FTP option, pull all the data local, and validate locally.

1 Ajaxerific - Terrific Ajax. A term I just made up :)

相关阅读:
Top