NYCPHP Meetup

NYPHP.org

[nycphp-talk] script to download remote log files (porting from Python to PHP)

Jon Baer jonbaer at jonbaer.net
Sat Jul 17 16:56:16 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ehh .. I dont know about you (or about the project itself) but Id
seriously consider using scp to grab the info.

http://www.llnl.gov/computing/gettingstarted/ssh.outside.html#transfer

I think you might be confused, the MD5 is not for encrypting the data,
its used for the authentication.

I grab logs inside PHP/CLI using ssh/scp and public key authentication.

`scp user at host:/var/log/* /local/var/log`

The backtick scripts can be used directly inside of PHP scripts, so once
the download is complete you can run preg_match() on the file or
whatever if you are looking for something to store (more efficient).

- - Jon

Jayesh Sheth wrote:

| Also - I am planning on making the connection data (in MySQL) encrypted
| with a master password. I think PHP and MySQL both support the one-way
| MD5 encryption algorithm, but not any two-way ones, right? I think I
| once read that PHP needed a special module to support a two-way
| encryption scheme. I think I came across an encryption algorithm for PHP
| some time ago, which I might use, unless there is an easier way
| (something built into MySQL or PHP).

- --

pgp key: http://www.jonbaer.net/jonbaer.asc
fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA+ZJwQdvbi5oMr0cRAoHrAJ9X9ZghwgrDLaZuiHnBR5HX7RClBACfZEbj
gnvYVrxz3tmZT7ZaC/XR2SE=
=o1o1
-----END PGP SIGNATURE-----



More information about the talk mailing list