NYCPHP Meetup

NYPHP.org

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

Jayesh Sheth jayeshsh at ceruleansky.com
Sat Jul 17 16:00:19 EDT 2004


Hello all,

I came across a neat Python script which does something which I always 
have needed:
automatically download Apache log files from a remote server. In my 
case, I manage multiple sites, so such a script is even more useful to me.

The script is available here:
http://www.uselesspython.com/logtransfer.py

I am not that familiar with Python, but I am able to figure out what it 
does. I am thinking of porting it to PHP so that if I have to modify it, 
that process will go faster. I am also thinking of putting an HTML or 
XUL frontend on it, and storing the connection data in MySQL.

Before I port it to PHP, I was wondering if anyone has written such a 
script in PHP in the past, or knows where I can find one.

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).

Any tips / suggestion on the best way to go about this (to port or not 
to port, to encrypt or not to encrypt, to use MySQL or not to use MySQL, 
to put a XUL front-end on or just stick with a command-line interface, 
if I am wasting my time doing this because something better already 
exists, etc.) would be greatly appreciated.

Thanks,

- Jay
PS: I came across a cool IDE for Python: Dr Python, available from 
drpython.sourceforge.net .




More information about the talk mailing list