Execute php or vbs code
Execute php or vbs code
Hi,
How can I run an external code in php or vbs from fivewin?
Thanks!
How can I run an external code in php or vbs from fivewin?
Thanks!
Re: Execute php or vbs code
Creo que lo puedes hacer usando webview, pero debes contar con un servidor web así sea de manera local.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com
[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com
[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
- Antonio Linares
- Site Admin
- Posts: 42273
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Execute php or vbs code
Code: Select all | Expand
#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
Re: Execute php or vbs code
Thanks Antonio, I use xharbour, where I can find curl compiled for xharbour?Antonio Linares wrote:Code: Select all | Expand
#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
- Antonio Linares
- Site Admin
- Posts: 42273
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Execute php or vbs code
Enrico may help us on this
Enrico do you know where to get it ? many thanks
Enrico do you know where to get it ? many thanks
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Execute php or vbs code
You have to build it yourself. From winmake\readme.txt:
Code: Select all | Expand
SET HB_DIR_CURL=<install dir>
Required to build hbcurl.lib
Download URL: http://curl.haxx.se/
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Execute php or vbs code
Antonio, did you receive hbcurl.lib for xHarbour? I've sent it to you yesterday on 23:28.
Re: Execute php or vbs code
Enrico,Enrico Maria Giordano wrote:You have to build it yourself. From winmake\readme.txt:
Code: Select all | Expand
SET HB_DIR_CURL=<install dir> Required to build hbcurl.lib Download URL: http://curl.haxx.se/
I tried to compile xharbour and curl and got several errors, can you send me the lib already compiled? Thanks.
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Execute php or vbs code
Thank You Enrico!
Re: Execute php or vbs code
Enrico, using Antonio's example, I have several errors. Need some other lib?
Error: Unresolved external 'WSAIoctl' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_init_mem' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_global_cleanup' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formfree' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_cleanup' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_reset' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_duphandle' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_init' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_pause' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_perform' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_send' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_recv' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_formadd' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_append' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_setopt' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_getinfo' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_slist_free_all' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_escape' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_unescape' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_version_info' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_easy_strerror' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_getdate' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_escape' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_unescape' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
Error: Unresolved external '_curl_free' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurl
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Execute php or vbs code
FWH 11.05? Very very old (May 2011). Could it be the reason for the errors? Antonio?
Re: Execute php or vbs code
Error: Unresolved external 'WSAIoctl' referenced from D:\LANG\FWH1105\XH1.2.1\LIB\HBCURL.LIB|hbcurlEnrico Maria Giordano wrote:FWH 11.05? Very very old (May 2011). Could it be the reason for the errors? Antonio?
In this case I found the solution linking ws2_32.lib
But others I think need to link others lib.
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Execute php or vbs code
Right. Try libcurl.lib from FWH lib directory.
Re: Execute php or vbs code
Good, no error, but in execution gives: Unrecoverable error 9011 - hb_xfree called with null pointerEnrico Maria Giordano wrote:Right. Try libcurl.lib from FWH lib directory.
Thank you!