Skip to content

Instantly share code, notes, and snippets.

View staatzstreich's full-sized avatar

Michael Staatz staatzstreich

View GitHub Profile
@staatzstreich
staatzstreich / ftp_download.php
Created November 30, 2012 12:45
Download a directory from an FTP Server
<?php
// ftp_sync - copy directory and file structure
// based on http://www.php.net/manual/es/function.ftp-get.php#90910
// main function witch is called recursivly
function ftp_sync($dir, $conn_id) {
if ($dir !== '.') {
if (ftp_chdir($conn_id, $dir) === FALSE) {
echo 'Change dir failed: ' . $dir . PHP_EOL;
return;
@staatzstreich
staatzstreich / nntplib.py
Created November 23, 2012 13:42
An NNTP client class
# This is the source linked from http://docs.python.org/2/library/nntplib.html
# Because the original file won't run out of the box, i removed some asterisk's (*)
# I have no idea why they where in the source because i'm new to python, started 4 Weeks ago :-)
# I have tested it with following simple snippet and for me it works:
"""
from nntplib import NNTP
s = NNTP('lists.typo3.org')
resp, count, first, last, name = s.group('typo3.projects.typo3v4mvc')