php 用curl_exec获取页面数据问题

WBOY
Release: 2016-06-02 11:32:43
Original
996 people have browsed it

phpcurl

图1-1
图片说明
图1-2
图片说明

代码如下:
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$contents = curl_exec($ch);
将页面取得的数据放到变量contents中,但执行print_r($contents),
打印出来的页面图2,与真实存在的页面的数据图1不一致(如上图1-1和图1-2,排序不一样)?这是为什么?

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