summaryrefslogtreecommitdiff
path: root/ext/ftp/ftp.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2000-09-13 22:00:31 +0000
committerDerick Rethans <derick@php.net>2000-09-13 22:00:31 +0000
commitc7d31495bf968e6709a47bc765256e11670e390d (patch)
treeb1c964010fac2068451ef7db45141ada310dd5a7 /ext/ftp/ftp.c
parenta6bb6f5df3909915eb4f88a8a6d1af5d657d17d5 (diff)
downloadphp-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.c14
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)