[Zope] Re: authentication with python program
Martijn Jacobs
martijn at fourdigits.nl
Fri Apr 18 18:48:35 EDT 2008
Miguel Beltran R. wrote:
> Yes please
> and thakns to every body
>
Here you go :
#!/bin/python
import base64
import urllib2
base64string = base64.encodestring('%s:%s' % ("username", "password"))
url = "http://10.28.1.239/bitacoras/alta/estado2.html"
req = urllib2.Request(url)
req.add_header("Authorization", "Basic %s" % base64string)
handle = urllib2.urlopen(req)
print handle.read()
--
Martijn Jacobs
Four Digits, Internet Solutions
a: Willemsplein 15-1 6811 KB Arnhem NL
kvk: 091621370000 | btw: 8161.22.234.B01
e-mail: martijn at fourdigits.nl | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
More information about the Zope
mailing list