get url content PHP

Amir Tugi picture Amir Tugi · Jul 6, 2012 · Viewed 140.4k times · Source

I wanna put the content of a URL in a string and the process it. However, I have a problem.

I get this error:

Warning: file_get_contents(http://www.findchips.com/avail?part=74ls244) [function.file-get-contents]: failed to open stream: Redirection limit reached,

I have heard this comes due to page protection and headers, cookies and stuff. How can I override it?

I also have tried alternatives such as fread along with fopen but I guess I just don't know how to do this.

Can anyone help me please?

Answer

T.Todua picture T.Todua · Mar 29, 2013

original answer moved to this topic .