Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg as Dword
Function PBMain() As Long
Local app$, LocalFilePath$, URLSite$, URLVerPath$,buffer$
'server information
URLSite$ = "www.garybeene.com"
URLVerPath$ = "http://www.garybeene.com/files/gbsnippets.ver" 'get the new app from the server
'read the file
Tcp Open "HTTP" At URLSite$ As #1 TimeOut 60000
Tcp Print #1, "GET " + URLVerPath$ + " HTTP/1.0"
Tcp Print #1, ""
Tcp Recv #1, 4096, buffer$ 'this gets the Header + Body
Tcp Close #1
buffer$ = Remain$(buffer$, $CrLf + $CrLf) 'this returns just the body
? buffer$
End Function
'gbs_00979
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm