获取 url 内容 PHP [英] get url content PHP

查看:29
本文介绍了获取 url 内容 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 URL 的内容放在一个字符串中并对其进行处理.但是,我有一个问题.

我收到此错误:

警告:file_get_contents(http://www.findchips.com/avail?part=74ls244) [function.file-get-contents]:无法打开流:达到重定向限制,

我听说这是由于页面保护和标题、cookies 和其他东西.我怎样才能覆盖它?

我也尝试过 fread 和 fopen 等替代方案,但我想我只是不知道该怎么做.

有人可以帮我吗?

解决方案

原答案移至本主题.>

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?

解决方案

original answer moved to this topic .

这篇关于获取 url 内容 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆