Get file from Webserver - Programmer

This is a discussion on Get file from Webserver - Programmer ; Hi guys, I want to write some program what will get some files from a WebServer. Now as per my understanding 1) I can create TCP connection and use socket programming to get the file. 2) I can use UDP ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Get file from Webserver

  1. Get file from Webserver

    Hi guys,

    I want to write some program what will get some files from a
    WebServer.

    Now as per my understanding
    1) I can create TCP connection and use socket programming to get the
    file.
    2) I can use UDP and socket programming to get the file.


    Once I connected to server on port 80 , how can I locate the file on
    web server and get the file?
    I think I need to give URL of file on server and there must be some
    API to get the file.

    Will this work behind proxy?? Do I need some additional work to make
    it work behind proxy?

    Guys,I am very new to network programming , so need your thoughts..



  2. Re: Get file from Webserver

    "spidy" wrote:

    > I want to write some program what will get some files from a
    > WebServer.


    Why don't you use a ready-made library designed for this.
    Like libcurl:
    http://curl.haxx.se

    No need to worry about all the details; the lib does it all for you.

    --gv

  3. Re: Get file from Webserver

    HI,

    Steps to Uploading or Publishing a File to Your Web Server

    For the purpose of this tutorial, I will assume that you wish to upload a file called "feedback.php". Everytime you see "feedback.php" mentioned, you can substitute that name with the name of the file you actually wish to upload. FileZilla does not restrict you to uploading only files of that name. You can upload images (eg, GIF, JPG, PNG, etc), HTML files, video clips, music files (eg MP3 files, WAV files, MIDI files), Perl scripts, PHP scripts, and so on. For the curious: I use "feedback.php" as the example file because this guide was originally written to help those who use my free Feedback Form Wizard to upload the generated form to their website.

    1.

    Click the "File" menu followed by the "Site Manager" item on that menu. A dialog box will appear.
    2.

    Click the "New Site" button on that dialog box. This creates a new item under "My FTP Sites" called "New FTP site". Rename "New FTP site" to the name of your site if you wish. By default, the keyboard cursor would have been placed in the name portion of "New FTP site" allowing you to change the name immediately. If you have lost the cursor because you accidentally clicked somewhere else in the dialog box, you can get it back by simply clicking once on the name. Note that this name can be anything you wish - it is not required for accessing your site. However, you will probably make your life easier if you change the name to that of your site rather than the cryptic "New FTP site".
    3.

    Under the tab "General", enter the name of your FTP server in the "Host" input box. For example, if your web host told you that your FTP hostname is "ftp.example.com", enter "ftp.example.com" into the space provided.
    4.

    Leave the "Port" and the "Servertype" entry boxes alone. Use your mouse and select "Normal" from the drop down list box for "Logontype". This will enable the "User" and "Password" boxes for the next step.
    5.

    Enter your user id or your login name (or whatever your web host calls it) into the "User" input box. Likewise, enter your password into the "Password" input box. Note that this information is automatically saved onto your computer and will be re-used the next time you run FileZilla, so you do not have to re-enter them again. (It also means that you should not use FileZilla in this way on computers that others may have access to, such as those found in an Internet cafe or a public library.)
    6.

    Click the "Connect" button. FileZilla will proceed to log you into your server. If it is successful, you will see a directory listing of your website's account in the right hand side of the FileZilla window. The left hand side of the FileZilla window shows the directories and files on your own computer.
    7.

    If your web host told you to only upload in a specific subdirectory on the web server, such as in the "www" or "public_html" directory, change to that directory by doubleclicking its name in the folder portion of the right window pane (the "Remote Site" window pane). FileZilla will open that folder and show you its contents in the files portion of the Remote Site window pane.
    8.

    Next, locate the file that you wish to upload in the left window pane (the "Local Site" pane). Both window panes behave mostly like a Windows Explorer windows, so navigating them should not be unduly hard. Once you have located the file you wish to upload, say "feedback.php", doubleclick it to upload it to your website. Alternatively, you can drag that file from the left window pane to the right window pane. The file will be uploaded to the folder that is currently open on the right window pane, so make sure you have changed to the directory you want before dragging the file there.
    9.

    As FileZilla proceeds to upload your file to your site, you should be able to see the upload progress in the bottommost window pane in FileZilla. When the upload has completed, you can disconnect from your website. Do this by clicking the "Server" menu followed by the "Disconnect" item.

+ Reply to Thread