Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get url content PHP [duplicate]

Tags:

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?

like image 595
Amir Tugi Avatar asked Jul 06 '12 13:07

Amir Tugi


1 Answers

original answer moved to this topic .

like image 178
T.Todua Avatar answered Oct 21 '22 11:10

T.Todua