Reading Files by client from Web Server via http

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
alexfrumkinAsked:
Who is Participating?
 
wpsjr1Connect With a Mentor Commented:
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
 
AzraSoundCommented:
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
 
samopalCommented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
alexfrumkinAuthor Commented:
What is Internet Transfer Control?
0
 
alexfrumkinAuthor Commented:
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
 
samopalCommented:
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
All Courses

From novice to tech pro — start learning today.