# more ftp functions

- Thread: https://externals.io/message/13987
- Original archive: https://news-web.php.net/php.internals/13987
- Started by Binam on 2004-12-02T18:30:17+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #13987 — Binam — 2004-12-02T18:30:17+00:00

URL: https://externals.io/message/13987#13987

I apologize if I am posting this to the wrong list I am a newbie to the
lists.
 
I would like to add some functions to the ftp extention. Most notably at
this point I am interested in a ftp_get_resp() that returns ftp->inbuf
and perhaps the response code from the server. Or maybe it could return
the whole conversation. A (very) basic example of what I am aiming for
is below. How should I proceed?
 
Thanks,
Jess
 
<?php
 
$conn = ftp_connect('ftp.somewhere.com');
$ok = ftp_login($conn,'user','pass');
if(!$ok){ echo ftp_get_resp($conn); }
$ok = `ftp_put()`;
if(!$ok){ echo ftp_get_resp($conn); }
 
?
