fb:porticula NoPaste
PNE :: examples/http_get.bas
Uploader: | PMedia |
Datum/Zeit: | 05.12.2007 15:04:21 |
''==============================================================================
''
'' PMedia's Network Engine
'' for FreeBASIC
''
''==============================================================================
'
' http_get.bas =----------------------------------------------------------------
'
' this example should show you how to use the abilities of the library.
' have fun and good luck for understanding
#include "pne/pne.bi"
dim as pne.Client serverCall
dim as string page
serverCall.connectDNS("www.freebasic.net", 80)
serverCall.lock_writebuffer()
serverCall.writeLN("GET / HTTP/1.0")
serverCall.writeLN("HOST: www.freebasic.net")
serverCall.writeLN("CONNECTION: CLOSE")
serverCall.writeLN("USER-AGENT: PNE " + serverCall.VersionS)
serverCall.writeLN("")
serverCall.unlock_writebuffer()
serverCall.readUntilDCon(page)
print page
sleep