Solved

Reading Files by client from Web Server via http

Posted on 2000-03-27
6
168 Views
Last Modified: 2013-11-13
I need to create a code on the client side [client-server app on the web] to read a file (.pdf) from the web server directory (the path is given). How can I use "get file" sintax to do so (if it is possible)? I vaguely remember the way it goes, like fso.get file[url: http://....], so I can download file info and, subsequently the whole file into client's local directory for further manipulations...Please, help!

Thank you for your time and effort
0
Comment
Question by:alexfrumkin
6 Comments
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
www.vbip.com is a great site for internet coding. Download examples there to get all you need to know about loading files off the web
0
 
LVL 9

Expert Comment

by:samopal
Comment Utility
To download file from the web just put on your form Internet Transfer Control and add line in code

sFile$=Inet1.OpenURL("www....")

HTH
0
 

Author Comment

by:alexfrumkin
Comment Utility
What is Internet Transfer Control?
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 3

Accepted Solution

by:
wpsjr1 earned 75 total points
Comment Utility
A GET request can be sent by the Winsock Control (the inet control is SO buggy) or Winsock API.

First open your file for Binary.

In your Winsock1_Connect event put:

Winsock1.SendData "GET /directory/filename.ext HTTP/1.0 & vbCrLF & vbCrLf

Then in the DataArrival event you PUT from the buffer to the file.

When the Winsock1_Close event fires you can Close the filenumber.

Enjoy!  :)

Paul
0
 

Author Comment

by:alexfrumkin
Comment Utility
Thank you. Could you be just a little more specific? I have the file at the server at (for ex.) url=http://12.24.35.test/file.pdf (this is just fictional directory for sample).
I need to have a code at the client to get this file. Could you put a few line of coding to illustrate your suggested solution, please?

Thank you very much

Alex
0
 
LVL 9

Expert Comment

by:samopal
Comment Utility
Internet Transfer Control is one of the VB components (WinSock control too). Go to Menu -> Project -> Components (or press Ctrl+T) and select component you need.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now