php - Python: how to make HTTP request internally/localhost -
i want send parameters python script on server php script on server using http. suggestions?
this pretty easy using urllib
:
import urllib myurl = 'http://localhost/script.php?var1=foo&var2=bar' # default action response = urllib.urlopen(myurl) # output assuming response code 200 data = response.read()
Comments
Post a Comment