Run python script by PHP from another server
First option: (Recommended)
You can create the python side as an API endpoint and from the PHP server, you need to call the python API.
Second option:
You can create the python side just like a normal webpage and whenever you call that page from PHP server you pass the params along with HTTP request, and after receiving data in python you print the data in JSON format.
I am making APIs.
I'm using CentOS for web server, and another windows server 2016 for API server.
I'm trying to make things work between web server and window server.
My logic is like following flow.
1) Fill the data form and click button from web server
2) Send data to windows server
3) Python script runs and makes more data
4) More made data must send back to web server
5) Web server gets more made datas
6) BAMM! Datas append on browser!
I had made python scripts.
but I can't decide how to make datas go between two servers..
Should I use ajax Curl in web server?
I was planning to send a POST type request by Curl from web server to Windows server.
But I don't know how to receipt those datas in windows server.
Please help! Thank you in advance.