Download file from WWW
Moderator: Rathinagiri
- serge_girard
- Posts: 2030
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Has thanked: 378 times
- Been thanked: 87 times
- Contact:
-
- Posts: 127
- Joined: Fri Feb 10, 2017 4:12 am
- DBs Used: DBF
- Has thanked: 29 times
- Been thanked: 7 times
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
-
- Posts: 285
- Joined: Thu Oct 16, 2014 11:35 am
- Location: Poland
- Has thanked: 76 times
- Been thanked: 225 times
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.

-
- Posts: 127
- Joined: Fri Feb 10, 2017 4:12 am
- DBs Used: DBF
- Has thanked: 29 times
- Been thanked: 7 times
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
-
- Posts: 285
- Joined: Thu Oct 16, 2014 11:35 am
- Location: Poland
- Has thanked: 76 times
- Been thanked: 225 times
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.