0

Can anyone tell what is the reason behind getting "HTTP request failed! HTTP/1.0 400 Multi-Hop Cycle" error om using "file_get_contents" in PHP ?

Nemo
  • 1,059
  • 3
  • 14
  • 31
  • 1
    I don't know the term "Multi-Hop Cycle" but maybe it's a loop of redirects? Any decent HTTP client (which may include the implementation of `file_get_contents`) can detect this and exit the loop with an error, such as this. – David Sep 29 '13 at 18:22
  • file_get_contents(http://weather.yahooapis.com/forecastrss?w=24537643&u=f); .. Error is thrown at this line.. – Nemo Sep 29 '13 at 18:23
  • This is what I'm seeing on my browser..Warning: file_get_contents(http://weather.yahooapis.com/forecastrss?w=2442046&u=f): failed to open stream: HTTP request failed! HTTP/1.0 400 Multi-Hop Cycle Detected in /Applications/MAMP/htdocs/Someproj/sometest.php on line 125 – Nemo Sep 29 '13 at 18:25

0 Answers0