Add files via upload
This commit is contained in:
parent
64c6352265
commit
35131ba393
90 changed files with 1738 additions and 0 deletions
8
netjson/example.bas
Normal file
8
netjson/example.bas
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "json.bas"
|
||||
|
||||
SUB MAIN
|
||||
DIM IP AS STRING
|
||||
IP = REQUEST("http://ifconfig.me/ip")
|
||||
PRINT IP
|
||||
PRINT REQUEST("http://ipwhois.app/json/" + IP)
|
||||
END SUB
|
10
netjson/json.bas
Normal file
10
netjson/json.bas
Normal file
|
@ -0,0 +1,10 @@
|
|||
REM RECEIVE DATA FROM
|
||||
REM REMOTE SERVER USING
|
||||
REM GET REQUEST
|
||||
FUNCTION REQUEST(ADDRESS AS STRING) AS STRING
|
||||
DIM RESPONSE AS STRING
|
||||
OPEN #1,ADDRESS,"r"
|
||||
READLINE #1,RESPONSE
|
||||
CLOSE #1
|
||||
REQUEST = RESPONSE
|
||||
END FUNCTION
|
Loading…
Add table
Add a link
Reference in a new issue