我变量中的示例内容是
HTTP/1.1 200 OK
Date: Wed, 29 Oct 2014 07:07:02 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.4
Vary: Accept-Encoding
Content-Length: 280
Content-Type: text/html
<?xml version="1.0"?>
<serviceResponse>
<status>Success</status>
<error/>
<pool_balance>100.00</pool_balance>
<kcm_wallet_balance>51.01</kcm_wallet_balance>
<glo_wallet_balance>0.00</glo_wallet_balance>
</serviceResponse>
我只想要这部分
<?xml version="1.0"?>
<serviceResponse>
<status>Success</status>
<error/>
<pool_balance>100.00</pool_balance>
<kcm_wallet_balance>51.01</kcm_wallet_balance>
<glo_wallet_balance>0.00</glo_wallet_balance>
</serviceResponse>
不知道如何在单独的变量中获取这些内容
答案 0 :(得分:1)
您需要将CURLOPT_HEADER
设置为false
以将其从响应中删除
尝试将CURLOPT_HEADER
设置为false
。