Download file from WWW
Moderator: Rathinagiri
- serge_girard
- Posts: 3169
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Download file from WWW
Hi,
Problem of course is when they change layout of pages !
Serge
Problem of course is when they change layout of pages !
Serge
There's nothing you can do that can't be done...
Re: Download file from WWW
I always use the help of Uncle Google
Last edited by edk on Fri Mar 17, 2017 8:00 am, edited 1 time in total.
Re: Download file from WWW
+1serge_girard wrote: ↑Fri Mar 17, 2017 7:54 am Hi,
Problem of course is when they change layout of pages !
Serge
The solution may be webApi, if it exists.
Re: Download file from WWW
Hi Edward,
I tried google but could not find the specific information on querying.
I will keep trying though, thanks.
One last thing. How can we check if we are connected to internet or not. In method 2 you have following code
// Connect to the HTTPs server
IF ! oHttp2:open( url+cGet )
msgbox( "Connection error:"+oHttp2:lastErrorMessage())
Return
ENDIF
but the above message is not displayed when I switched my internet off.
Can you pls tell how can we check if we are connected or not.
Many thanks
I tried google but could not find the specific information on querying.
I will keep trying though, thanks.
One last thing. How can we check if we are connected to internet or not. In method 2 you have following code
// Connect to the HTTPs server
IF ! oHttp2:open( url+cGet )
msgbox( "Connection error:"+oHttp2:lastErrorMessage())
Return
ENDIF
but the above message is not displayed when I switched my internet off.
Can you pls tell how can we check if we are connected or not.
Many thanks
Re: Download file from WWW
Queries depend on how the system is built on the side of the host. If the publisher does not provide documentation for general queries, please consult the source code html and see how they are called queries from the website.
Maybe it will be a little helpful: https://perishablepress.com/how-to-writ ... arameters/
To checking your Internet connection, try to use this function:
Of course, this will work properly until google.com is alive.
I know from experience that hbTip may have some bugs, and sometimes did not work as we expect.
Maybe it will be a little helpful: https://perishablepress.com/how-to-writ ... arameters/
To checking your Internet connection, try to use this function:
Code: Select all
IF !isInternet()
MsgStop("No Internet connection")
Return
ENDIF
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FUNCTION isInternet( nTimeOut )
Local aAddr:=hb_socketResolveINetAddr( "www.google.com" , 80 )
Local socket:=hb_socketOpen()
Local lIsNet
Default nTimeOut:=2000
lIsNet:=!EMPTY( aAddr ) .AND. hb_socketConnect( socket , aAddr, nTimeOut )
hb_socketClose( socket )
RETURN lIsNet
I know from experience that hbTip may have some bugs, and sometimes did not work as we expect.
Re: Download file from WWW
Hi Edward,
Thanks for the code for checking internet connection. Its working
Also many thanks for the link where I can learn about querying. Looks like exhaustive information.
I can't thank you enough for being so patient in teaching and explaining me all the intricacies of downloading from internet.
Many thanks for everything.
RPC
Thanks for the code for checking internet connection. Its working
Also many thanks for the link where I can learn about querying. Looks like exhaustive information.
I can't thank you enough for being so patient in teaching and explaining me all the intricacies of downloading from internet.
Many thanks for everything.
RPC
Re: Download file from WWW
Hi Edward!
Maybe you know, how to detect proxy server?
Your samples and help are very good
Maybe you know, how to detect proxy server?
Your samples and help are very good
Re: Download file from WWW
I'm sorry Marek, but I did not need to use a proxy and do not have a ready solution for you.
So I quickly found on the description in C.
http://stackoverflow.com/questions/2025 ... y-settings
and from msdn
https://msdn.microsoft.com/pl-pl/librar ... s.85).aspx
I don't now how to check it out, because I'm with my kid in the clinic for a few days.
Regards, Edward.
So I quickly found on the description in C.
http://stackoverflow.com/questions/2025 ... y-settings
and from msdn
https://msdn.microsoft.com/pl-pl/librar ... s.85).aspx
I don't now how to check it out, because I'm with my kid in the clinic for a few days.
Regards, Edward.