by lucasdebeltran » Tue Jun 24, 2014 12:26 pm
Colin,
This is a simple that Works fine:
- Code: Select all Expand view
FUNCTION MAIN()
LOCAL oHttp, cHtml, hQuery
oHttp:= TIpClientHttp():new( "http://www.google.de/search" )
// build the Google query
hQUery := Hash()
hSetCaseMatch( hQuery, .F. )
hQuery["q"] := "xHarbour"
hQuery["hl"] := "en"
hQuery["btnG"] := "Google+Search"
// add query data to the TUrl object
oHttp:oUrl:addGetForm( hQuery )
// Connect to the HTTP server
IF oHttp:open()
// downlowad the Google response
cHtml := oHttp:readAll()
Memowrit( "Google_xHarbour.html", cHtml )
oHttp:close()
? Len(cHtml), "bytes received "
?? "and written to file Google_xHarbour.html"
ELSE
? "Connection error:", oHttp:lastErrorMessage()
ENDIF
RETURN
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.