Use Python from PHP | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Use Python from PHP

Hi all, let's suppose there is a running python script performing a task, now you want to send/ask a request to that script from PHP. How would you accomplish this? , I have seen approaches where PHP starts the python script with some arguments and finally gets the result. But in this case the python script is always running Thank you for your time reading my concern, I would appreciate any help or advise

6th Nov 2019, 6:04 AM
Javier Torres
Javier Torres - avatar
1 Answer
+ 1
you need to read about inter-process communication. you can talk to the process via pipes using stdout/stdin or using sockets
6th Nov 2019, 2:53 PM
Dev Project
Dev Project - avatar