I'm trying to run an external exe from browser server side, I found two snippets in another post (http://forums.spiderbasic.com/viewtopic.php?f=6&t=292), I tried them in xampp, it didn't works, it seems I'm missing something:
SpiderBasic file "Test.sb":
Code: Select all
Procedure UpperWeb(Success, Result$)
If Success
SetGadgetText(3,Result$)
Else
Debug "Failed"
EndIf
EndProcedure
Procedure getbutton()
temp$=GetGadgetText(3)
HTTPRequest(#PB_HTTP_Get, "http://127.0.0.1/cgi-bin/upper.pbe?string="+temp$, "", @UpperWeb())
EndProcedure
If OpenWindow(1, 100, 100, 250, 75, "Test", #PB_Window_TitleBar)
ButtonGadget(2, 20, 30, 75, 30, "To Upper")
StringGadget(3, 120, 30, 75, 30, "abc")
BindGadgetEvent(2,@getbutton(), #PB_EventType_LeftClick )
EndIf
then in PureBasic (v5.30) , I've created "upper.pb" (CGI libs already installed)
Code: Select all
CGI_In()
string$=CGI_Val("string")
string$=UCase(string$)
CGI_Header()
CGI_Out(string$)
End
Going back to C;\xampp\htdocs\test\, clicking on test.html, then inside to "To Upper" button gives "Failed".
I didn't understand the line; HTTPRequest(#PB_HTTP_Get, "http://127.0.0.1/upper.pbe?string="+temp$, "", @UpperWeb())
what upper.pbe stands for?
any help is appreciated.