Home  >  Article  >  Backend Development  >  javascript - 当前页面获取另一个页面(http://hq.sinajs.cn/list=s_sh000001)的全部数据,有什么方法可以获取?

javascript - 当前页面获取另一个页面(http://hq.sinajs.cn/list=s_sh000001)的全部数据,有什么方法可以获取?

WBOY
WBOYOriginal
2016-06-06 20:28:331543browse

就是我当前的页面需要抓取另一个页面的全部数据(http://hq.sinajs.cn/list=s_sh000001),有什么方法能获得另一个页面的数据吗?

回复内容:

就是我当前的页面需要抓取另一个页面的全部数据(http://hq.sinajs.cn/list=s_sh000001),有什么方法能获得另一个页面的数据吗?

  
  

javascript - 当前页面获取另一个页面(http://hq.sinajs.cn/list=s_sh000001)的全部数据,有什么方法可以获取?

file_get_contents()
curl

用JS的话,一楼的方法足够了;
用PHP的话,那么file_get_contents()是最简单粗暴的方式,分分钟数据到手。CURL也可以,不过需要配置好curl的options

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn