The principle of setting up files on a server to be downloaded and installed by a web user is a black art to me. Could anyone explain how I can do this.
What I mean is...If I go to a web site and it has software that can be downloaded...then you click on a button and lo...that software is downloaded to your computer.So how can I set up software on a server so that people can download it.
Ok, you need to look into using sockets (winsock or socketwrench... I like socketwrench better, but winsock will get the job done). Then, you need to connect to the web server with the socket... chances are it will be running on port 80, but this is not a requirement. Once you connect to the socket, you need to pass it an "HTTP Request Header." That header would include the server's path (relative to the web server) to the file. Then, the webserver would return a mime header (HTTP Response Header), that you would need to basically check (in order to make sure it's not a 404 error, or some nonsense). If the response is ok (like 200) after the 2 line breaks would start the actual file. You save that in a file with your open command, and call it a day. The process might be something more like "read from socket, write to file, read from socket, write to file", but the idea is the same.
There is an easier method if you follow this link through to it's conclusion (or I guess jump to the last post). This should give you a pretty good idea of what's happening.
Thanks Comatose, I really wish I knew what you were talking about.
forget for a moment how I get the software to the server, lets concentrate how some user out there in cyberspace gets it off my web site. Also is there anything in the setup kit that will prepare the project to be downloaded..or don't I know what I am talking about.
I guess I'm slightly confused about what you are trying to do, so let me try this:
a web server is a program running on a computer somewhere. One computer can run many servers (I have a server that runs a web page (web-server), runs a mail server program, runs an irc server program, a DNS server program, and an SVN server program). This would cause some kind of problem, but each server runs in a different slot on the network connection called a port. These ports are represented by numbers. For example, if I connect to that remote computer, and tell it to use port 80, then it knows to use the web server (assuming the web server is running on port 80... this is not a requirement, just a stern suggestion from IANA). Now, I tell my web browser to connect to google.com. My browser knows to try to connect to port 80, on google.com. When my web browser connects to google.com, it says "hey google, how about you get me this file." Sometimes that file contains HTML (web page code). Sometimes that file is a .txt file... and sometimes it's a file that the web browser doesn't know about... so it asks you to download it. The web-server doesn't care... it has no idea what is in the file....and it doesn't want to know. It simply accepts the connection on the port, sees if the file you requested exists... if so, it opens it up, and spits out it's contents to the network connection. The client (program that initiated the connection) does all the translation and downloading and everything. It is the beast that knows "hey, this is an image... I should display it" or "hey, this is HTML, I should make a web page", etc. So, when the browser gets the data, it decides what to do with it.
1) client connects to web server on specific port
2) client requests specific file
3) server checks if file exists (if not responds with 404 error)
4) server opens the file, reads the contents
5) server spits out contents of file to the connection
6) server disconnects the connection.
7) It's that easy.
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...
OK, so HostGator for some reason no longer allows gcc/g++ access unless you have a Designated Server account, which is a lot of money to spend just to compile my "Hello World" program. Thus I figured I'd compile at home, then upload. Program is your regular old bare-bones Hello World ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...