diff options
author | Derick Rethans <derick@php.net> | 2000-09-13 22:00:31 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2000-09-13 22:00:31 +0000 |
commit | c7d31495bf968e6709a47bc765256e11670e390d (patch) | |
tree | b1c964010fac2068451ef7db45141ada310dd5a7 /ext/ftp/ftp.c | |
parent | a6bb6f5df3909915eb4f88a8a6d1af5d657d17d5 (diff) | |
download | php-git-c7d31495bf968e6709a47bc765256e11670e390d.tar.gz |
- Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
@ Added ftp_exec to the ftp functions (thanks to <jhennebicq@i-d.net>)
@ (Derick)
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r-- | ext/ftp/ftp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 45b01e799d..a750265fcc 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -315,6 +315,20 @@ ftp_pwd(ftpbuf_t *ftp) int +ftp_exec(ftpbuf_t *ftp, const char *cmd) +{ + if (ftp == NULL) + return 0; + if (!ftp_putcmd(ftp, "SITE EXEC", cmd)) + return 0; + if (!ftp_getresp(ftp) || ftp->resp != 200) + return 0; + + return 1; +} + + +int ftp_chdir(ftpbuf_t *ftp, const char *dir) { if (ftp == NULL) |