Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reading Files by client from Web Server via http

Posted on 2000-03-27
6
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2661790
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
ID: 2661856
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
ID: 2661893
What is Internet Transfer Control?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Accepted Solution

by:
wpsjr1 earned 225 total points
ID: 2662032
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
ID: 2664373
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
ID: 2664379
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
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 the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

721 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