Hi NG,
I need a solution for my Access 97 application. I have to transfer a file
(size 100-500kb) from a server with https.
Example: https://ip.of.my.server/share/textfile.txt -> c:\
Does anybody have a sample code for this?
I tried the transfer library of Dev Ashish - but unfortunately this code
does not work with https... (I posted my problem a couple of days ago...)
Any support is appreciated
Regards
Hanspeter 6 1704
Try this, I wrote it just for you :D
(Cuz I noticed you posed the same question last week, and I didn't have
the time/motivation to do it.....)
Sub GetTxtfilefromHTTP(strFileName As String)
'strFileName is the name of the file you wish to send the document to
'This code was originally written by Dion Douglas
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
' Requires two references
' shdocvw.dll - Microsoft Internet Controls
' mshtml.tlb - Microsoft HTML Object Library
'
Dim objIE As SHDocVw.InternetExplorer
Dim strFileName As String, txtDoc As String
Dim objDoc As Object
Dim intfree As Integer
Set objIE = New SHDocVw.InternetExplorer
With objIE
.Navigate2 "http://www.google.com"
.Visible = True
Do While .Busy = True
Loop
Set objDoc = .Document
intfree = FreeFile
Open strFileName For Output As #intfree
Write #intfree,
objDoc.body.parentElement.innerHTML
Close #intfree
End With
Set objDoc = Nothing
objIE.Quit
Set objIE = Nothing
End Sub
oh man, I meant to also write in to fix the address ....
change this line:
Sub GetTxtfilefromHTTP(strFileName As String)
to
Sub GetTxtfilefromHTTP(strFileName As String, strHTML as String)
AND
change this line:
.Navigate2 "http://www.google.com"
to .Navigate2 strHTML
Then you can call it variably as needed :D
Note, this will also get you the 'source' of html pages, and can be
used as such.
~Red
chaneg this:
On 10 Jan 2006 11:28:41 -0800, Red wrote: oh man, I meant to also write in to fix the address ....
change this line: Sub GetTxtfilefromHTTP(strFileName As String)
to Sub GetTxtfilefromHTTP(strFileName As String, strHTML as String)
AND change this line: .Navigate2 "http://www.google.com"
to .Navigate2 strHTML
Then you can call it variably as needed :D
Note, this will also get you the 'source' of html pages, and can be used as such.
~Red
chaneg this:
Thank you Red for your replay - I will give a try tomorow and give you some
feedback...
Reagrds
Hanspeter
Not a problem...
To explain how this works... what this actually does is get the
'source' from the page you are going to (strHTML)... and, seeing your
file is a text file, it should work quite well. Now, if you needed
another type of file (say a zip file), you would have to do a bit more
coding.
~Red
On 10 Jan 2006 13:41:38 -0800, Red wrote: Not a problem... To explain how this works... what this actually does is get the 'source' from the page you are going to (strHTML)... and, seeing your file is a text file, it should work quite well. Now, if you needed another type of file (say a zip file), you would have to do a bit more coding.
~Red
Hi Red,
I tried your code and got one Problem -> when code comes to line:
..Navigate2 strHTML a Windows-Popup opens with the question of opening or
saving the file...
with regular asp or html files your code works fine...
Regards
Hanspeter
I will look into it when I get a chance over the weekend. If someone
else would help, I'd be glad to know..
I think you could probably suppress the msgbox, but, let me look it
over./.. dont' have time today =)
~Red This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Philipp Brune |
last post by:
Hi all,
the following problem occured to me and I hope somebody can
help me :
I need to implement an encrypted File download with
a PHP script on the server side and a c# client application....
|
by: Philip Korolev |
last post by:
Hi All.
I am attempting to use SSL for the first time with ASP.NET I would like to be able to send my form details to another page using https:// connection. The page I am sending data to, uses...
|
by: Moheb Missaghi |
last post by:
Hi,
I am getting the following error when using
Server.Transfer:
System.ArgumentException: Invalid path for child
request 'https://....'. A virtual path is expected
I am using...
|
by: Gigino |
last post by:
I'm developing an asp.net application and i need to execute an aspx
page using Secure Socket Layer; the problem is:
i call the page web form http://server/page1.aspx; when i submit this
form, i...
|
by: R.A. |
last post by:
Hi,
Is there a way to have asp.net transfer the session id in the url as a
paramenter and not as part of the web address? something like the following:...
|
by: Hanspeter Leupin |
last post by:
Hi NG,
I used the Internet Data Transfer Library of Dev Ashish found at
http://www.mvps.org/access/modules/mdl0037.htm to transfer text files from
a server with HTTPS in my old Ms Access 97...
|
by: p3t3r |
last post by:
I am using .NET2 and have a number of aspx pages. On each page is a
LinkButton that performs a server.transfer() to another page.
If we use page names A,B,C,D,E as an example. I start on page A...
|
by: lygine |
last post by:
Dear all,
I am new to .net, therefore needed your advice/input how to write a program to transfile file from backend (batch job) using https protocol? I need to transfer flat file as batch...
|
by: jjaimes |
last post by:
I am new in Perl and I need some help with the following,
from a Unix box I want to transfer a file that is in https page port 443, in where I have to put username and password to go inside, but I...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |