跨域共享cookies

来源:互联网 发布:用java编写菱形图案 编辑:程序博客网 时间:2024/06/11 19:46

一个简单的跨域方法,当访问一个页面的是,写入每一个需要共享的域名,用iframe 引入调用其他域名写入,可以写入。例如


<iframe style="display: none" src="http://wx.huolan.net/index/b.php?uck=17057"></iframe><iframe style="display: none" src="http://wx.weilai.net/index/b.php?uck=17057"></iframe><iframe style="display: none" src="http://wx.27.cn/index/b.php?uck=17057"></iframe><iframe style="display: none" src="http://wx.kanglu.com/index/b.php?uck=17057"></iframe><iframe style="display: none" src="http://wx.zuiyu.com/index/b.php?uck=17057"></iframe><iframe style="display: none" src="http://wx.qilincar.com/index/b.php?uck=17057"></iframe>


这几个域名都是指定到..b.php文件在,b.php写入cookie,当访问这几个域名的时候,都可以调用对应的cookie。


0 0