[mod_python] Calling PHP pages

Nick nick at dd.revealed.net
Mon Apr 18 13:50:49 EDT 2005


You really want to be using urllib2.urlopen with a urllib2.Request object.

Nick

Bo Jangeborg wrote:
> Hello
> 
> I need to call a login routine to allow my python pages to coexist with 
> my current
> php pages. For this to work I need to pass the cookie information to the 
> php page.
> 
> I am using the python urllib and are calling the page with the data 
> option in the hope
> that this will pass the cookie information along. This however does not 
> seem to work.
> 
> filehandle = 
> urllib.urlopen('http://fakeurl.com/login_py.php',data=urllib.urlencode(req.headers_in)) 
> 
> 
> Am I on the right track, or is there another way ?
> 
> Bo Jangeborg
> Softwave
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list