Execute php or vbs code

Re: Execute php or vbs code

Postby Enrico Maria Giordano » Sat Sep 02, 2023 3:56 pm

Can you send me a very little PRG example to test it here?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Execute php or vbs code

Postby Antonio Linares » Sat Sep 02, 2023 4:23 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Execute php or vbs code

Postby wartiaga » Sat Sep 02, 2023 10:41 pm



Antonio,

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

hCurl := curl_easy_init()

Any idea?
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Execute php or vbs code

Postby wartiaga » Sun Sep 03, 2023 2: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
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests