{"id":174,"date":"2011-02-25T15:37:19","date_gmt":"2011-02-25T15:37:19","guid":{"rendered":""},"modified":"2011-04-25T07:08:39","modified_gmt":"2011-04-25T07:08:39","slug":"wap%e7%bd%91%e7%ab%99%e4%b8%8b%e7%9a%84session%e4%bf%9d%e6%8c%81","status":"publish","type":"post","link":"https:\/\/www.inbreak.net\/archives\/174.html","title":{"rendered":"WAP\u7f51\u7ad9\u4e0b\u7684session\u4fdd\u6301"},"content":{"rendered":"

<\/p>\n

<\/p>\n

\u518d\u8c08\u4e00\u4e0b<\/span>session<\/span>\u4fdd\u6301\uff0c\u7531\u4e8e<\/span>session<\/span>\u603b\u662f\u4f1a\u8fc7\u671f\u7684\uff0c\u9700\u8981\u4e00\u76f4\u6709\u4eba\u5237\u65b0\u624d\u884c\u3002\u8fd8\u8bb0\u5f97<\/span>cnqing<\/span>\u5199\u7684\u90a3\u4e2a<\/span>session<\/span>\u4fdd\u6301\u5de5\u5177\uff0c\u5176\u5b9e\u653b\u51fb<\/span>wap<\/span>\u4e0d\u9700\u8981\u4fdd\u6301\u771f\u6b63\u7684<\/span>session<\/span>\uff0c\u8981\u7684\u662f<\/span>sid<\/span>\u3002\u6211\u4eec\u53ea\u8981\u4e0b\u9762\u4e00\u6bb5<\/span>javascript<\/span>\u4ee3\u7801\uff0c\u5c31\u53ef\u4ee5\u4e00\u76f4\u4fdd\u6301\u8fd9\u4e2a<\/span>sid<\/span>\u4e86\u3002\u539f\u7406\u8fd8\u662f<\/span>wap<\/span>\u9a8c\u8bc1\u4f7f\u7528\u7684\u662f<\/span>sid<\/span>\uff0c\u800c\u4e0d\u662f<\/span>session<\/span>\uff0c\u6240\u4ee5\u53ea\u8981<\/span>1<\/span>\u5206\u949f\u5185\u53d1\u4e00\u4e2a<\/span>get<\/span>\u8bf7\u6c42\uff0c\u5e26\u4e0a<\/span>sid<\/span>\u5c31\u597d\u3002<\/span><\/p>\n

DEMO<\/span>\uff1a<\/span><\/p>\n

 <\/p>\n

\r\n
    \r\n\t
  1. <<\/span>script<\/span>><\/span>\u00a0<\/span><\/span><\/li>\r\n\t
  2. \/\/\u4e0b\u9762\u662f\u8981\u4fdd\u6301session\u7684\u5730\u5740\u3002\u00a0<\/span><\/li>\r\n\t
  3. var\u00a0url<\/span>=<\/span>\"\u00a0http:\/\/bbs.ecshop.com\/wap\/index.php?sid=1oALS7\"<\/span>;\u00a0<\/span><\/span><\/li>\r\n\t
  4. \u00a0<\/span><\/li>\r\n\t
  5. window.setInterval(\"keepsid()\",\u00a060000);\u00a0<\/span><\/li>\r\n\t
  6. \u00a0<\/span><\/li>\r\n\t
  7. function\u00a0keepsid(){\u00a0<\/span><\/li>\r\n\t
  8. \u00a0\u00a0\u00a0\u00a0document.getElementById(\"iframe1\").src<\/span>=<\/span>url<\/span>+\"&<\/span>time<\/span>=\"+Math.random();\u00a0<\/span><\/span><\/li>\r\n\t
  9. }\u00a0<\/span><\/li>\r\n\t
  10. <\/<\/span>script<\/span>><\/span>\u00a0<\/span><\/span><\/li>\r\n\t
  11. <<\/span>iframe<\/span>\u00a0<\/span>id<\/span>=<\/span>\"iframe1\"<\/span>\u00a0<\/span>src<\/span>=<\/span>\"\"<\/span>><\/span><\/<\/span>iframe<\/span>><\/span>\u00a0<\/span><\/span><\/li>\r\n<\/ol>\r\n<\/pre>\n

    \u4ee5\u4e0a\u4ee3\u7801\u53ea\u8981\u4fdd\u5b58\u4e3a<\/span>htm<\/span>\u6587\u4ef6\u7528\u6d4f\u89c8\u5668\u6253\u5f00\u5c31\u597d\u3002\u4f60\u751a\u81f3\u53ef\u4ee5\u4e00\u4e2a\u9875\u9762\u4e0a<\/span>N<\/span>\u591a<\/span>iframe<\/span>\uff0c<\/span>N<\/span>\u591a<\/span>sid<\/span>\uff0c\u540c\u65f6\u4fdd\u6301\u7740\uff0c\u5b83\u4eec\u53ef\u4ee5\u662f\u4e0d\u540c\u7684<\/span>sid<\/span>\u3002<\/span><\/p>\n

    \"image002.jpg\"<\/a><\/p>\n

     <\/p>\n","protected":false},"excerpt":{"rendered":"

    \u518d\u8c08\u4e00\u4e0bsession\u4fdd\u6301\uff0c\u7531\u4e8esession\u603b\u662f\u4f1a\u8fc7\u671f\u7684\uff0c\u9700\u8981\u4e00\u76f4\u6709\u4eba\u5237\u65b0\u624d\u884c\u3002\u8fd8\u8bb0\u5f97cnqing\u5199\u7684\u90a3\u4e2asession\u4fdd\u6301\u5de5\u5177\uff0c\u5176\u5b9e\u653b\u51fbwap\u4e0d\u9700\u8981\u4fdd\u6301\u771f\u6b63\u7684session\uff0c\u8981\u7684\u662fsid\u3002\u6211\u4eec\u53ea\u8981\u4e0b\u9762\u4e00\u6bb5javascript\u4ee3\u7801\uff0c\u5c31\u53ef\u4ee5\u4e00\u76f4\u4fdd\u6301\u8fd9\u4e2asid\u4e86\u3002<\/p>\n

    \u7ee7\u7eed\u9605\u8bfb »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,5],"tags":[25,79],"views":9366,"_links":{"self":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/174"}],"collection":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":4,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/posts\/174\/revisions\/176"}],"wp:attachment":[{"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inbreak.net\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}