Enrico Maria Giordano wrote:Can you send me a very little PRG example to test it here?
Enrico, Antonios example:
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
function Main()
curl_global_init()
? "Hello world"
? callPHP( "www.fivetechsoft.com/getip.php" )
curl_global_cleanup()
return nil
function callPHP( cUrl )
local hCurl, uValue
if ! empty( hCurl := curl_easy_init() )
curl_easy_setopt( hCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
if curl_easy_perform( hCurl ) == 0
uValue = curl_easy_dl_buff_get( hCurl )
endif
endif
return uValue