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-09-18 20:07:18 UTC
README
这是一个对lastpass-cli项目的非官方、部分移植,用于使用PHP从LastPass检索用户的存储账户信息。此项目与LastPass没有任何关联。
要求
为了使用此工具,您需要具有OpenSSL扩展的PHP,以及phpseclib库。
示例用法
获取用户存储的LastPass信息的示例
<?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")); ?>