views:

345

answers:

1

hello. 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

A: 

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
mst