douqianmin5367 2009-12-29 15:41
浏览 228
已采纳

get_headers()达到重定向限制,中止。 无法打开流:正在进行操作

trying to write a functional php script to detect charset retrieve web pages. My script works, but if I enter get_headers () for webtrh.cz/66997-fakturace-ramci-dph?p=416206

get_headers(http://webtrh.cz/66997-fakturace-ramci-dph?p=416206);

the result: get_headers() [function.get-headers]: Redirection limit reached, aborting. in /home/www/tcladin.cz/subdomains/www/include/funkce.php on line 583 Warning: get_headers(http://webtrh.cz/66997-fakturace-ramci-dph?p=416206) [function.get-headers]: failed to open stream: Operation now in progress in /home/www/tcladin.cz/subdomains/www/include/funkce.php on line 583

get_headers using to test URL

I received a similar error only pages from webtrh.cz Similarly, acts as the functions get_meta_tags ().

"Functional" script is http://tcladin.cz/pokus/charset.php Further details on the Czech forum diskuse.jakpsatweb.cz/?action=vthread&forum=9&topic=104412, where unfortunately I have no answer

  • 写回答

1条回答 默认 最新

  • dongnaosuan5407 2009-12-29 15:50
    关注

    This website is broken, because your client function does not handle session IDs it will keep redirecting to itself. Use a fully fledged HTTP client.

    HEAD -eS http://webtrh.cz/66997-fakturace-ramci-dph?p=416206
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=111a329fc1632272a0403db172579199&s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=318e7bc7ab78e5a2f96acddd6f84147c&s=111a329fc1632272a0403db172579199&s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=7679f6fbe731aef1ccfbc9550535bc9c&s=318e7bc7ab78e5a2f96acddd6f84147c&s=111a329fc1632272a0403db172579199&s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    HEAD http://webtrh.cz/66997-fakturace-ramci-dph?s=427b87ff88b92928bc96f3464c64411f&s=7679f6fbe731aef1ccfbc9550535bc9c&s=318e7bc7ab78e5a2f96acddd6f84147c&s=111a329fc1632272a0403db172579199&s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206 --> 301 Moved Permanently
    Cache-Control: private, post-check=0, pre-check=0, max-age=0
    Connection: close
    Date: Tue, 29 Dec 2009 15:48:47 GMT
    Pragma: no-cache
    Location: http://webtrh.cz/66997-fakturace-ramci-dph?s=39c9ebd344b1a1b473fcba1dcaab38f8&s=427b87ff88b92928bc96f3464c64411f&s=7679f6fbe731aef1ccfbc9550535bc9c&s=318e7bc7ab78e5a2f96acddd6f84147c&s=111a329fc1632272a0403db172579199&s=a3defbb086f1810cc45df07b6669b961&s=8989dd7c5daad97e23ca77b1ccadde06&s=6e10b6d98d94e570cce1267cff4cbefb&p=416206
    Server: Apache/2.2.3 (CentOS)
    Content-Type: text/html; charset=UTF-8
    Expires: 0
    Client-Date: Tue, 29 Dec 2009 15:48:17 GMT
    Client-Response-Num: 1
    Client-Warning: Redirect loop detected (max_redirect = 7)
    Set-Cookie: bbsessionhash=39c9ebd344b1a1b473fcba1dcaab38f8; path=/; domain=.webtrh.cz; HttpOnly
    Set-Cookie: bblastvisit=1262101727; expires=Wed, 29-Dec-2010 15:48:47 GMT; path=/; domain=.webtrh.cz
    Set-Cookie: bblastactivity=0; expires=Wed, 29-Dec-2010 15:48:47 GMT; path=/; domain=.webtrh.cz
    
    X-Powered-By: PHP/5.1.6
    X-UA-Compatible: IE=7
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了