import requests
url = 'http://localhost:8000/file.php'
parms = {
'name':'value'
}
headers = {
'User-agent': 'none/ofyourbussiness',
'Spam':'Eggs'
}
resp = requests.post(url,data=parms,headers=headers)
text =resp.text
print(text) # output
'''
Array
(
[name] => value
)
''
print_r($_POST); // Array()