Created
September 17, 2013 12:02
-
-
Save vakata/6593424 to your computer and use it in GitHub Desktop.
import Filezilla to KeePass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$xml = simplexml_load_file('FileZilla.xml'); | |
$csv = fopen('FileZilla.csv','w'); | |
fputcsv($csv, ["Account","Login Name","Password","Web Site","Comments"]); | |
foreach($xml->xpath('//Server') as $server) { | |
fputcsv($csv, [(string)$server->Name, (string)$server->User, (string)$server->Pass, ((int)$server->Protocol ? 'sftp://' : 'ftp://' ) . (string)$server->Host.':'.(string)$server->Port, (string)$server->Comments]); | |
} | |
fclose($csv); |
Thanks :)
That's what I like, Simple, direct and efficient :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very usefull peace of work - thank you!