I am attempting to create an agent to collect data and hopefully over HTTP post the file to a webserver running apache2. I am currently using the the following python script to hopefully push the file.
import requests
txt = {'file': open('/tmp/pysrv01-20151207-212735')}
post = requests.post('someaddr', files=txt)
I understand that possible a simple php page could accept the post and store the file in a directory. Any idea's to something simple and lightweight? Maybe this is a wrong approach.
POSTitself is not particularly special when talking about cross-language. In order to accept aPOSTrequest in PHP you should look at $_POST the PHP itself should not care where thePOSTrequest came from, but may have difficulty parsing the string it receives.