1

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
asked Dec 22, 2015 at 18:20

1 Answer 1

2

Isn't it because it is https, as described in the most voted response here: python ignore certicate validation urllib2

answered Dec 22, 2015 at 18:28
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.