2009年7月23日星期四

[PerlChina] Re: 用CGI and CGI:: Cookie模块 如何实现跨域读取cookie

有个 变相的办法  在A域下 写个getcookie.cgi 把A域的cookie值输出   

在B域下 通过 getcookie.cgi 读取  用ajax的跨域也可以这样实现  
 
不过 感觉这个方法有点儿。。。

 
> Date: Thu, 23 Jul 2009 15:55:02 +0800
> From: fayland@gmail.com
> To: perlchina@googlegroups.com
> Subject: [PerlChina] Re: 用CGI and CGI:: Cookie模块 如何实现跨域读取cookie
>
> no, you can't. browser security issue.
>
> Thanks.
>
> wbi 畢 wrote:
> > A域不做任何修改 能不能从B域直接读取A域cookie值??
> >
> > 试验代码如下 没能实现
> >
> > use CGI;
> > use CGI::Cookie;
> >
> > my $c = new CGI::Cookie(-domain=>'***.***.***');
> >
> > #$c->domain("****.***.***");
> > my %name = $c->fetch;
> >
> > ------------------------------------------------------------------------
> > 【MSN相談箱】メールで聞いて分からないことMSN相談箱で調べて見よう
> > ▲▲▲130 万人以上が使っているMSN相談箱なら見つかります!▲▲▲
> > <http://clk.atdmt.com/GBL/go/130818982/direct/01/>
> > >
>
>
> --
> Fayland Lam // http://www.fayland.org/
> Foorum based on Catalyst // http://www.foorumbbs.com/
>
>
> --~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

没有评论: