Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

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
0
alexfrumkin
Asked:
alexfrumkin
1 Solution
 
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
 
alexfrumkinAuthor Commented:
What is Internet Transfer Control?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
wpsjr1Commented:
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
 
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

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now