Jump to content

FTP downloads


ameliabob
 Share

Recommended Posts

FTP server are different from web server. when we handle mysql database we made connection to mysql server which is also seperate server running on the machine. we talk to that server with the specific port the server are bound to listen. opening socket on specific port and connecting it is that what php do. so in that case php is client which is connection to the mysql server. same happens with FTP. to be more elaborate, if FTP and MYSQL is is installed an running with php as module of apache, there is three server is running on. when user request apache got listen to the web port. it runs a php instance handle the php file make opcodes,executes it. when php files are getting executed they create socket on port and connect to respective running servers, recievs the response back to php and php handle the request and serve out the page.

Edited by birbal
Link to comment
Share on other sites

That was way too much information in way to few lines. I am loooking for a snippet of code resident on the server that would prepare a file and send it to the user. The user would only be sending a request to the server to prepare and send it. Any place where I can find such code?

Link to comment
Share on other sites

How exactly are you expecting to send this file to the user? Do they have an FTP server setup? Perhaps you should familiarize yourself with FTP first.http://en.wikipedia.org/wiki/File_Transfer_Protocol

Link to comment
Share on other sites

I am loooking for a snippet of code resident on the server that would prepare a file and send it to the user. The user would only be sending a request to the server to prepare and send it.
How is that different than a regular hyperlink? You put a link on your page to the file to download, the user clicks it, their browser requests the file from the server, and the server sends it. How is what you're trying to do different than what browsers already do?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...