I'm trying to get data from php script using a my python script:
#!/usr/bin/python
import urllib
import urllib2
url = 'https://example.com/example.php'
data = urllib.urlencode({'login' : 'mylogin', 'pwd' : 'mypass', 'data' : 'mydata'})
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
d = response.read()
print d
doesn't run with error:
ERROR=1704
php script accepts:
url: https://example.com/example.php?login=xxxxxxx&pwd=xxxxxxx&t=3