北京建网站软件,做网站阳泉,网站备案号 有效期,几千元的网站建设15/01/31本文关键字: 302, header, location//初始化url信息$host “#8221;;$url$host.”l/rzTf7ap2viw/iid222004556resourceId0_04_05_99/v.swf”;//按照字段获取header响应信息$headers get_headers($url, TRUE);//获取这个土豆的302跳转地址$u302 $headers[“Lo…15/01/31本文关键字: 302, header, location//初始化url信息$host “#8221;;$url$host.”l/rzTf7ap2viw/iid222004556resourceId0_04_05_99/v.swf”;//按照字段获取header响应信息$headers get_headers($url, TRUE);//获取这个土豆的302跳转地址$u302 $headers[“Location”];正常状况下的高级别apache和php版本 获取这个location是没有问题的但是由于版本的弊端有个别低版本无法正常返回location信息其他信息正常测试其它跳转url正常返回location信息。究其原因php header location主要是location过长导致的。如下#038;swfPathhttp://js。tudouui。com/bin/lingtong/SocialPlayer_148。swfyoukuIdXODgxOTM5MDAwvcodeXODgxOTM5MDAwlshare1listOwner460446025tvcCode-1tagnulltitle%E9%82%A3%E4%BA%9B%E5%B9%B4%E4%B8%8EDr。%E9%AD%8F%E7%BF%BB%E8%84%B8%E8%BF%87%E7%9A%84%E8%AF%84%E5%A7%94mediaTypevitotalTime225470hdType3hasPassword0nWidth-1isOriginal0channelId31nHeight-1banPublicfalsevideoOwner460446025videoOwner460446025ocodepdyocYRfWoctict3is1080p0hasWaterMark0totalTime225470channelId31cskcodea9rf5GDdhhUpanelRecmhttp://css。tudouui。com/bin/lingtong/PanelRecm_9。swzpanelDanmuhttp://css。tudouui。com/bin/lingtong/PanelDanmu_18。swzpanelEndhttp://css。tudouui。com/bin/lingtong/PanelEnd_13。swzpepperhttp://css。tudouui。com/bin/binder/pepper_17。pngpanelSharehttp://css。tudouui。com/bin/lingtong/PanelShare_7。swzpanelCloudhttp://css。tudouui。com/bin/lingtong/PanelCloud_12。swzautoPlayfalselistType1rurlresourceId0_04_05_99autostartfalselid21537817lCodeNaeTFum4PsYsnap_pichttp%3A%2F%2Fr1。ykimg。com%2F0541040854C9B0FE6A0A4E14293159E1aopRate0。01p2pRate0。95adSourceId99999yjuidnullyseid1422598983263d9LR4nyseidtimeout1422629597814yseidcount2uidnulljuid0191ummk6k17lcvip0另外也有个别服务器版本存在直接截断的弊端就是显示这个url地址不完整。会把余下的location信息传输到下一个header的字段中php header location这个可以检测输出可见。所以尝试输出的之后 可以考量合并处理 例如$u302$header[10].$header[11];其他的一些hader信息获得普通方式网上有很多这里就不再介绍了。本文来自电脑杂谈转载请注明本文网址http://www.pc-fly.com/a/jisuanjixue/article-122273-1.html