<?php
date_default_timezone_set('PRC');
$ch?=?curl_init();
$postFields?=?'email=郵箱&password=密碼&remember=1';
$httpHeader?=?[
????'Content-Type:?application/x-www-form-urlencoded;?charset=utf-8',
????'Content-Length:?'?.?strlen($postFields),
];
curl_setopt($ch,?CURLOPT_URL,?'http://idcbgp.cn/account/login');
curl_setopt($ch,?CURLOPT_POST,?true);
curl_setopt($ch,?CURLOPT_POSTFIELDS,?$postFields);
curl_setopt($ch,?CURLOPT_HTTPHEADER,?$httpHeader);
curl_setopt($ch,?CURLOPT_HEADER,?false);
curl_setopt($ch,?CURLOPT_RETURNTRANSFER,?true);
curl_setopt($ch,?CURLOPT_FOLLOWLOCATION,?true);
curl_setopt($ch,?CURLOPT_COOKIESESSION,?true);
curl_setopt($ch,?CURLOPT_COOKIEFILE,?'cookiefile');
curl_setopt($ch,?CURLOPT_COOKIEJAR,?'cookiefile');
curl_setopt($ch,?CURLOPT_COOKIE,?session_name()?.?'='?.?session_id());
curl_exec($ch);
$httpHeader?=?[
????'Content-Type:?text/xml',
];
curl_setopt($ch,?CURLOPT_URL,?'http://idcbgp.cn/u/3073012');
curl_setopt($ch,?CURL_POST,?false);
curl_setopt($ch,?CURL_HTTPHEADER,?$httpHeader);
$result?=?curl_exec($ch);
curl_close($ch);
echo?$result;

2019-10-17
請(qǐng)問大概是怎么解決的?我也遇到這種問題,不知道怎么入手解決
2018-08-24
也想學(xué)習(xí)一下