Are you running the script on a server or in a console? The readline() function is only available (and only makes sense) when running the command line interface (CLI) version of PHP. In addition to that, it is possible that your PHP installation simply doesn't have Readline included (for more info, see the documentation: http://php.net/manual/en/book.readline.php)
I have a question about the readline part. Is there another way to get the PIN than to manually connect to your account webpage? I can not possibly believe that you can get quotations from an external website that way.