Skip to content

robertromore/lastpass-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lastpass-php

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"));

?>

About

Retrieve accounts from LastPass with PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages