azurIt
azurit at pobox.sk
Mon Apr 18 13:57:45 EDT 2005
hi, maybe this will not help you but it's a way too :) you can pass that cookie as a variable to php, something like: filehandle = urllib.urlope('http://fakeurl.com/login_py.php?cookie=% s' % cookie,data=urllib.urlencode(req.headers_in)) and then you can take it from php script (well, some changes in php will be probably needed). ..or you can try to add Set-Cookie part of header to the req object before calling that: req.headers_in.add("Set-Cookie", "cookie=%s" % cookie) but i don't know if this is possible :) i was adding such a things only to the headers_out so i can't tell now. hope it helps :) azurIt > 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 > ____________________________________ Vsetko o SuperStar http://superstar.atlas.sk
|