0

sample contents present in my variable are

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>

I want only this part

  <?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>

no idea how to fetch those contents in seperate varaible

2
  • Are you reading a xml file or a text file with xml content Commented Oct 29, 2014 at 7:20
  • no i am getting this output from curl in a variable. Commented Oct 29, 2014 at 7:22

1 Answer 1

1

You need to set CURLOPT_HEADER to false to remove this from response

try to set CURLOPT_HEADER to false.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.