FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Execute php or vbs code
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Execute php or vbs code
Posted: Sat Sep 02, 2023 03:56 PM

Can you send me a very little PRG example to test it here?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Execute php or vbs code
Posted: Sat Sep 02, 2023 04:23 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Execute php or vbs code
Posted: Sat Sep 02, 2023 10:41 PM
Antonio Linares wrote:Here is the fix:

https://fivetechsupport.com/forums/viewtopic.php?p=261933&sid=e40d5c87f730f220256e173ddafb1157#p261933
Antonio,

I made some progress but this line below hCurl is returning "ValToChar not suported type yet"

hCurl := curl_easy_init()

Any idea?
Posts: 253
Joined: Wed May 25, 2016 01:04 AM
Re: Execute php or vbs code
Posted: Sun Sep 03, 2023 02:47 AM
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

Continue the discussion