They are 2 years ago, i need to remote PhantomJS directly, (Sending command, have the answer, sending another time command, have answer, etc..)
And INFRATEC give to me a code for do this
http://www.purebasic.fr/english/viewtop ... 00#p481800
I have try the INFRATEC code with "php.exe" and that not works (No return or crash)
Is it possible to remote PHP directly with this code like PhantomJS ?
Have you a better and simple way, for connect PB and PHP together ?
I have also try with Stdin/Stdout like say the php doc, with the "-a" option and nothing, just "Interactive mode enabled" return
Code: Select all
Compilateur = RunProgram("E:\PHPPortable\App\Php\php.exe", "-a", "E:\PHPPortable\App\Php\", #PB_Program_Open|#PB_Program_Connect|#PB_Program_Read|#PB_Program_Write)
Sortie$ = ""
Repeat
Commande$ = InputRequester("Remote PHP", "Entrer your command", "echo 'Hello Kcc';")
WriteProgramString(Compilateur, Commande$)
If Compilateur
While ProgramRunning(Compilateur)
If AvailableProgramOutput(Compilateur)
Sortie$ + ReadProgramString(Compilateur) + Chr(13)
Debug Sortie$
EndIf
Wend
EndIf
Until Commande$ = ""
CloseProgram(Compilateur) ; Ferme la connection vers le programme