fetching_20a_20secure_20web_20page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
fetching_20a_20secure_20web_20page [2018/07/30 22:42] – Updated to TLS v1.2 richardrussell | fetching_20a_20secure_20web_20page [2025/03/23 15:13] (current) – richardrussell | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Fetching a secure web page===== | =====Fetching a secure web page===== | ||
- | //by Richard Russell, July 2009, updated July 2018//\\ \\ The procedure listed below fetches the contents of a secure (**https: | + | //by Richard Russell, July 2009, updated July 2018 and March 2025// |
- | If you want to distribute **libssl-1_1.dll** and **libcrypto-1_1.dll** with your application then store them in **@dir$** and embed them in the executable. Alternatively you can put them in **@lib$** (or a sub-directory) but in that case you will need to amend the procedure below to load them explicitly from that location. | + | The procedure listed below fetches the contents of a web resource to a specified file; it uses the code listed in the //BBC BASIC for Windows// [[https:// |
+ | |||
+ | <code bb4w> | ||
+ | url$ = " | ||
+ | file$ = @tmp$ + " | ||
+ | SYS " | ||
+ | SYS " | ||
+ | SYS `URLDownloadToFile`, | ||
+ | IF fail% ERROR 100, "File download failed" | ||
+ | OSCLI "RUN notepad """ | ||
+ | </ | ||
+ | |||
+ | If you find this code doesn' | ||
+ | | ||
+ | |||
+ | If you want to distribute **libssl-3.dll** and **libcrypto-3.dll** with your application then store them in **@dir$** and embed them in the executable. Alternatively you can put them in **@lib$** (or a sub-directory) but in that case you will need to amend the procedure below to load them explicitly from that location. | ||
The procedure should be called in the following context: | The procedure should be called in the following context: | ||
Line 31: | Line 46: | ||
PROC_initsockets | PROC_initsockets | ||
- | SYS " | + | SYS " |
- | IF libeay% = 0 PROCsslcleanup : ERROR 100, " | + | IF libeay% = 0 PROCsslcleanup : ERROR 100, " |
SYS " | SYS " | ||
- | SYS " | + | SYS " |
- | IF libssl% = 0 PROCsslcleanup : ERROR 100, " | + | IF libssl% = 0 PROCsslcleanup : ERROR 100, " |
SYS " | SYS " | ||
SYS " | SYS " |
fetching_20a_20secure_20web_20page.1532990568.txt.gz · Last modified: 2024/01/05 00:17 (external edit)