tags:

views:

364

answers:

1

Hello all, I am using DOM Simple HTML Parser, and return this error:

Warning: file_get_contents(h**p://info.xxxx.org/eng/txt_detail.jsp?cid=2_8&channelid=3&primarykeyvalue=132234142&libid=2&doctype=1) [function.file-get-contents]: failed to open stream: Redirection limit reached

Somebody please help.

+1  A: 

It sounds like you are getting lots of 302 redirection statuses. This can happen when a page wants to set a cookie, but you aren't accepting it, so it redirects you and tries to set the cookie again, which fails and it redirects you...

When I try to visit that URL I get a 404 status code.

What language and other libraries are you using?

Chas. Owens
I have the same problem - is there a way to use file_get_contents to accept cookies?
gnucom
Try using `WWW::Mechanize` instead (http://search.cpan.org/dist/WWW-Mechanize/lib/WWW/Mechanize.pm).
Chas. Owens