jeudi 14 septembre 2017

How to connect back to a created process in PHP and execute commands?

It seems impossible, but i want to connect back to a previously created process in PHP to execute more commands. (dynamic shell problem)

For example: I create a process on a Windows (XAMPP) machine with a php function called proc_open.

I send a command for example ftp with proc_open to the Server through php. I don't have a problem with dynamic outputs, however, because of the nature of ftp, it's a dynamic console interface, and not a static.

I know, I can send commands in a .txt file for ex. and run it at once, but i want to dynamicly write to the 'process shell', and get a messeage from each interaction i made to it. (error message or nothing)

Is this even possible with some process ID magic, or I am just wasting my time trying to do that?

Thank you for your answers! :)




Aucun commentaire:

Enregistrer un commentaire