To generate a new key pair load 'generate.php'. Next copy/paste the private key that is displayed into 'index.php' (you can't miss what needs to be replaced). This way you can just place the project somewhere on a web server supporting PHP and use it.
This example just shows you how to do the encryption and decryption using these libraries. Important here is that jsbn expects the public key to be in hex, rather than the OpenSSL type notation generated by phpseclib.
Finally this project used the JQuery and Twitter Bootstrap to do the heavy lifting and make the example page look reasonably good.