Download file from WWW
Moderator: Rathinagiri
Re: Download file from WWW
Hi mlnr
Thanks for the code. It works !!!
I can download from the net now
I have another problem. I want to download some information from the web page.
It means I have to "read" the page from the program and download that information.
Is it possible
Thanks once again for your help.
Thanks for the code. It works !!!
I can download from the net now
I have another problem. I want to download some information from the web page.
It means I have to "read" the page from the program and download that information.
Is it possible
Thanks once again for your help.
Re: Download file from WWW
Hi mlnr
The program works fine but it would be even better
if there is way to add a progress bar and the ability
to resume downloads without starting from the beginning
after interruption.
The program works fine but it would be even better
if there is way to add a progress bar and the ability
to resume downloads without starting from the beginning
after interruption.
Re: Download file from WWW
Hi hmgaams57
You can get the file size
Code: Select all
oSoap:getResponseHeader("Content-Length")
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
Hi RPC,RPC wrote: ↑Wed Mar 08, 2017 3:15 pm Hi mlnr
Thanks for the code. It works !!!
I can download from the net now
I have another problem. I want to download some information from the web page.
It means I have to "read" the page from the program and download that information.
Is it possible
Thanks once again for your help.
Sorry, i cannot help you. Maybe someone has an information.
Best regards,
Gabor
Gabor
Re: Download file from WWW
Hi mlnr
Its OK if you cant help in "reading" webpage
At least now I can download links.
Thank you
Its OK if you cant help in "reading" webpage
At least now I can download links.
Thank you
Re: Download file from WWW
Hi RPC.
Try this: C:\hmg.3.4.3\HARBOUR\contrib\hbtip\tests\loadhtml.prg
But, if you need to read pages from https, you must include SSL suport
You need also in hbc:
Include in hbp:
And most important: DLLs
Edward.
Try this: C:\hmg.3.4.3\HARBOUR\contrib\hbtip\tests\loadhtml.prg
But, if you need to read pages from https, you must include SSL suport
Code: Select all
#require "hbssl"
REQUEST __HBEXTERN__HBSSL__
IF !tip_SSL()
MsgStop("Required SSL")
Return
ENDIF
oHttp := TIPClientHTTP():new( "https://www.google.com/search", .F. )
Code: Select all
libs=hbssl
libs=libeay32
libs=ssleay32
Libs=hbtip
Code: Select all
hbssl.hbc
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Download file from WWW
Thx Edward!
Is there a specific folder for the DLL needed or just where the EXE is located?
Is there a specific folder for the DLL needed or just where the EXE is located?
There's nothing you can do that can't be done...
Re: Download file from WWW
Just where EXE is located.
Edward.
Edward.
Re: Download file from WWW
Hi Edwardsedk wrote: ↑Fri Mar 10, 2017 10:29 am Hi RPC.
Try this: C:\hmg.3.4.3\HARBOUR\contrib\hbtip\tests\loadhtml.prg
But, if you need to read pages from https, you must include SSL suportYou need also in hbc:Code: Select all
#require "hbssl" REQUEST __HBEXTERN__HBSSL__ IF !tip_SSL() MsgStop("Required SSL") Return ENDIF oHttp := TIPClientHTTP():new( "https://www.google.com/search", .F. )
Include in hbp:Code: Select all
libs=hbssl libs=libeay32 libs=ssleay32 Libs=hbtip
And most important: DLLsCode: Select all
hbssl.hbc
ssl_dll.7z
Edward.
Many thanks for the code and description.
I tried to compile, thro IDE, loadhtml.prg but got error BASE/1004 No Exported method: AS
Unfortunately I am quite dumb in understanding all this.
I have to download data from following site
https://www.nseindia.com/products/conte ... x_data.htm
Time period is 10 march 2017 to 10 march 2017 and click Get Data button. Then you will get follo info
Date : 10-Mar-2017 | Open : 8953.70 | High : 8975.70 | Low : 8903.95 | Close : 8934.55 | Shares Traded : 157419999 | Turnover(Rs Cr) : 7385.28
There is also a hyperlink - Download file in CSV format - towards right side corner of the information downloaded. Clicking on this downloads the above information in a CSV file.
It is this information which I want to download. I notice it is a https page. Could you please send a program to download the info in a CSV/text file. I would be very grateful.
Thanks
RPC
Re: Download file from WWW
Hi!
Sorry for delay, but last week I was absent without internet.
I have no limitations in type of downloaded file, but this solution has a problem with some proxy servers.
Put a description of error which you geet.
Hi Gabor! Your solution with SOAP is very interesting. Can you add to your code lines, which changes http AGENT to Mozilla or IE?
Sorry for delay, but last week I was absent without internet.
I have no limitations in type of downloaded file, but this solution has a problem with some proxy servers.
Put a description of error which you geet.
Hi Gabor! Your solution with SOAP is very interesting. Can you add to your code lines, which changes http AGENT to Mozilla or IE?
Re: Download file from WWW
Hi molmol wrote: ↑Sun Mar 12, 2017 6:06 am Hi!
Sorry for delay, but last week I was absent without internet.
I have no limitations in type of downloaded file, but this solution has a problem with some proxy servers.
Put a description of error which you geet.
Hi Gabor! Your solution with SOAP is very interesting. Can you add to your code lines, which changes http AGENT to Mozilla or IE?
Its ok if you couldn't answer earlier. You have been very helpful and I appreciate that.
Following is the screen shot of the error I put following url in window
https://www.nseindia.com/content/histor ... av.csv.zip
and save to was a.zip filename, when I click the download button I got above error message.
Thanks