Команда: TYPE I
Ответ: 200 Switching to Binary mode.
Команда: PASV
Ответ: 227 Entering Passive Mode
Команда: STOR map-copy.png
Ответ: 150 Ok to send data.
Ответ: 226 Transfer complete.
Статус: Файл передан успешно, передан 69 459 байт в 1 секунда
Статус: Получение списка каталогов...
Команда: PASV
Ответ: 227 Entering Passive Mode
Команда: LIST
Ответ: 150 Here comes the directory listing.
Ответ: 226 Directory send OK.
Статус: Список каталогов извлечен
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
10:04:45.942509 IP (tos 0x0, ttl 118, id 14646, offset 0, flags [DF], proto TCP (6), length 52)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [S], cksum 0xff92 (correct), seq 990096889, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:04:45.972074 IP (tos 0x0, ttl 118, id 14647, offset 0, flags [DF], proto TCP (6), length 40)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [.], cksum 0xdac8 (correct), ack 2821577823, win 256, length 0
10:04:45.994950 IP (tos 0x0, ttl 118, id 14649, offset 0, flags [DF], proto TCP (6), length 53)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0xcda4 (correct), seq 0:13, ack 37, win 256, length 13
10:04:46.017772 IP (tos 0x0, ttl 118, id 14650, offset 0, flags [DF], proto TCP (6), length 57)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x911c (correct), seq 13:30, ack 71, win 256, length 17
10:04:46.047514 IP (tos 0x0, ttl 118, id 14652, offset 0, flags [DF], proto TCP (6), length 54)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x2d80 (correct), seq 30:44, ack 94, win 256, length 14
10:04:46.071891 IP (tos 0x0, ttl 118, id 14653, offset 0, flags [DF], proto TCP (6), length 75)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0xdae7 (correct), seq 44:79, ack 120, win 256, length 35
10:04:46.095725 IP (tos 0x0, ttl 118, id 14655, offset 0, flags [DF], proto TCP (6), length 45)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x3b6c (correct), seq 79:84, ack 157, win 256, length 5
10:04:46.175143 IP (tos 0x0, ttl 118, id 14657, offset 0, flags [DF], proto TCP (6), length 40)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [.], cksum 0xd9b4 (correct), ack 194, win 255, length 0
10:04:49.406554 IP (tos 0x0, ttl 118, id 14659, offset 0, flags [DF], proto TCP (6), length 48)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x07b3 (correct), seq 84:92, ack 194, win 255, length 8
10:04:49.430816 IP (tos 0x0, ttl 118, id 14660, offset 0, flags [DF], proto TCP (6), length 46)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x28de (correct), seq 92:98, ack 225, win 255, length 6
10:04:49.456833 IP (tos 0x0, ttl 118, id 14662, offset 0, flags [DF], proto TCP (6), length 59)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0xbd36 (correct), seq 98:117, ack 277, win 255, length 19
10:04:49.583274 IP (tos 0x0, ttl 118, id 14724, offset 0, flags [DF], proto TCP (6), length 40)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [.], cksum 0xd92a (correct), ack 299, win 255, length 0
10:04:50.011955 IP (tos 0x0, ttl 118, id 14733, offset 0, flags [DF], proto TCP (6), length 46)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x2863 (correct), seq 117:123, ack 323, win 255, length 6
10:04:50.033458 IP (tos 0x0, ttl 118, id 14734, offset 0, flags [DF], proto TCP (6), length 46)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x2c24 (correct), seq 123:129, ack 374, win 255, length 6
10:04:50.104691 IP (tos 0x0, ttl 118, id 14740, offset 0, flags [DF], proto TCP (6), length 40)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [.], cksum 0xd895 (correct), ack 437, win 254, length 0
Команда: PASV
Ответ: 227 Entering Passive Mode
Команда: STOR raions-msk211.png
Ответ: 150 Ok to send data.
Ошибка: Превышено время ожидания соединения
Ошибка: Передача файла потерпела неудачу
10:05:18.548021 IP (tos 0x0, ttl 118, id 14742, offset 0, flags [DF], proto TCP (6), length 46)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x27e6 (correct), seq 129:135, ack 437, win 254, length 6
10:05:18.573838 IP (tos 0x0, ttl 118, id 14743, offset 0, flags [DF], proto TCP (6), length 64)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [P.], cksum 0x1d66 (correct), seq 135:159, ack 488, win 254, length 24
10:05:18.686228 IP (tos 0x0, ttl 118, id 14752, offset 0, flags [DF], proto TCP (6), length 40)
static-host.kzn16.ru.65017 > example.com.ftp: Flags [.], cksum 0xd82e (correct), ack 510, win 254, length 0
Использовал реализацию json_encode вот отсюда: (для php менее 5.4.0)
snippets.pp.ru/article/159
Если у вас php 5.4.0 или выше — можно просто поставить флаг JSON_UNESCAPED_UNICODE