robertromore / lastpass-php
dev-master
2017-03-15 19:14 UTC
Requires
- phpseclib/phpseclib: 2.0.4
This package is not auto-updated.
Last update: 2024-04-17 18:21:58 UTC
README
This is an unofficial, partial port of the lastpass-cli project, and is used to retrieve a user's stored accounts' information from LastPass with PHP. This project is not associated with LastPass in any way.
requirements
In order to use this, you will need PHP with the OpenSSL extension, and the phpseclib library.
example usage
An example of getting a user's stored LastPass information:
<?php require_once "path/to/phpseclib"; require_once "path/to/lastpass-php"; $LP = new LastPass("username", "password"); $all_accounts = $LP->searchAccounts(); // The searchAccounts method also accepts two parameters: // $search (string) The text to search for. // $fields_to_search (array) An array of account fields to search through. By default, this method searches all fields: id, name, fullname, url, and username. $mysite_account = $LP->searchAccounts("mysite", array("url")); ?>