无法使用cUrl或file_get_contents获取html源代码

时间:2016-12-22 21:52:42

标签: php html curl file-get-contents source-code-protection

抱歉无法获取此网址的html源代码:http://www.picbear.com/tag/ok;

我总是得到一个带有[" Hello Stranger"]消息的空白页面。

如果我使用chrome的工具,

没问题。

我总是使用php_simple_html$url = "http://www.picbear.com/tag/ok"; $html = file_get_contents($url); echo $html; DOM解析器,没有任何问题。

由于我的提供商限制,我无法访问php.ini,但它应该没问题。

帮助任何人?感谢。

String[] from = new String[] {category.KEY_NAME,"MAX","PROGRESS"};
int[] to = new int[] {R.id.l_cat,progressbar4.setMax,progressbar4.setProgress};

adapter = new SimpleCursorAdapter(this,R.layout.customListView,cursor,from,to,0);

1 个答案:

答案 0 :(得分:1)

只需添加<div class="form-horizontal"> <div class="form-group"> <label class="control-label col-lg-6">Discount Terms</label> <div class="col-lg-3"> <input type="text" class="form-control" /> </div> <div class="col-lg-3"> <input type="text" class="form-control" /> </div> </div> </div>标题:

User-Agent
相关问题