Home > Backend Development > PHP Tutorial > PHP香港特别行政区服务器用file_get_contents 抓取天猫的数据都是繁体的

PHP香港特别行政区服务器用file_get_contents 抓取天猫的数据都是繁体的

WBOY
Release: 2016-06-13 12:31:46
Original
898 people have browsed it

PHP香港服务器用file_get_contents 抓取天猫的数据都是繁体的

我在香港服务器上用file_get_contents 抓取的天猫的数据都是繁体的;

我不想用繁转简的方法,我想抓取过来就是简体的,怎么设置比较好呢?

如果用curl,那我也不太懂curl的内容为何直接输出页面了,怎么不让他输出,只是赋值给变量呢?

curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); <br />
	curl_setopt($ch, CURLOPT_HEADER, true);<br />
	$contents = curl_exec($ch);
Copy after login

file_get_contents curl
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template