By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,806 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,806 IT Pros & Developers. It's quick & easy.

sending FTP packets in PHP

P: n/a
so... i'm trying to send some FTP packets, via PHP, and... i'm not
really sure how to construct 'em. HTTP 1.0 packets have the following
structure:

GET http://whatever.com/ HTTP/1.0
Accept: */*
Referer: http://whateveryouwantagain.com/

etc

to send these packets, one would have to use fsocketopen, using port
80, and then fputs.

but what structure do FTP packets have? they'd probably have to have
a place for the password / username, but what else? also, is there,
perhapes, some PHP function that would make this easier? thanks! :)
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
te*******@yahoo.com (yawnmoth) wrote in message
news:<a0**************************@posting.google. com>...

i'm trying to send some FTP packets, via PHP, and... i'm not
really sure how to construct 'em.
First of all, it is not necessary; PHP has a set of FTP functions:

http://www.php.net/ftp
one would have to use fsocketopen, using port 80, and then fputs.
Hmm... Actually, default FTP port is 21...
but what structure do FTP packets have?


If you are really curious, read RFC 959:

http://www.ietf.org/rfc/rfc0959.txt

Cheers,
NC
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.