THttp:Get
  

NAME

Get - get a remote page

SYNOPSIS

Get( cPage, aPair )

PURPOSE

Get a remote page

EXAMPLE

#include "common.ch"

*----------------------------------------------------

FUNCTION Main( cProxy, nProxyPort )

*----------------------------------------------------

local oSock, cRet

local cServer  := "www.google.com" // "localhost"  //

local nPort    := 80               // 8080         //


DEFAULT nProxyPort TO "8080"


oSock := THttp():New()

if cProxy!=NIL

oSock:SetProxy( cProxy, VAL(nProxyPort) )

endif


? "Connect to " +cServer +":" +alltrim(str( nPort ))

if oSock:Connect( cServer, nPort )

? "Connected"


? "Get homepage"

? oSock:Get( "pippo:pluto@/" )


? "Close connection"

if oSock:Close()

? "Close successfull"

else

? "Error on close connection"

endif

else

? "Refused"

endif


RETURN NIL

SEE ALSO

THttp:Post