Passing Data from PHP to Python -


i trying decide on best way send data across php script python script. please keep reading have looked @ existing posts on subject. doing following suggested 1 of posts have read:

example .php $var1 = 2; $tmp = exec(/var/www example.py $var1); echo "$tmp";  example.py import sys print sys.argv[1] 

this seems working ok. although in stages. php script sending on reasonable amount of data generated html form wondered if efficient way of sending it.

the php, html , python scripts running on raspberry pi connected via wired lan laptop.

ultimately going have use tcp/ip read various commands desktop sending them out via tcp/ip (i can't change this) wondered whether better initialize sockets , use method send data php script python.

i quite new range of languages looking advice can investigate further. have looked @ various other posts none seem match trying do.

you use queuing service gearman, client in php , worker in python or vice versa.

someone has created example setup here.

https://github.com/dbaltas/gearman-python-worker


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)