Re: Php logging into online bank to get details automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Nichel wrote:
I. Gray wrote:

I thought I may of read of this somewhere- but I may be wrong. I am also
not sure whether this is allowed by banks, so please let me know- I want
to stay on the right side of the law!

Your account...I can't see where it would be a problem with how you access it.

Here in New Zealand most banks have a clause in their Internet Banking terms of use saying that you may not use automated systems to access the banking system. Many of them include those silly CAPTCHA things to try and prevent them too.

IANAL, but you may want to have a close look at your bank's terms of use.

I'd like a php script to access my bank balances and send me an email
daily. I know how to set up cron and use the php mail feature, and to
parse web pages using php but the problem is reading a page in SSL and
putting info in multiple forms. For example my bank asks for two
security numbers then 2 digits from a password on the next page. Is it
possible to use php to do this? Is there a script out there which would
help me here. I have googled to try and find out but to no avail.

Try cURL...it may help.  http://www.php.net/curl

Even file_get_contents() and friends can access SSL URLs, provided PHP is compiled with SSL support, but they can't send POST requests which you need for logging in, etc.

So use CURL to post to the login form, and then get the session cookie that they send back, and send that along with your request for the balances page.

Once you've got the content of the page just apply string functions or some regex magic to get your balances, or go hardcore and try to parse their page with the DOM functions.

Remember that your code will likely break if they make substantial changes to their site design.

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux