Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7049871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:04:26+00:00 2026-05-28T03:04:26+00:00

hi guys i below is what i receive from a curl response. HTTP/1.1 200

  • 0

hi guys i below is what i receive from a curl response.

HTTP/1.1 200 OK
X-Account-Object-Count: 4
X-Account-Bytes-Used: 3072798
X-Account-Container-Count: 3
Accept-Ranges: bytes
Content-Length: 15
Content-Type: text/plain; charset=utf-8
Date: Thu, 12 Jan 2012 04:07:33 GMT

a1
abc
testing

i found a good function which parses the headers and i can grab the key value pairs in headers not a problem the problem i have is how to grab the names in the body
a1
abc
testing

i think may be regex can do the best job but do not know if regex is the best approach or is there any other function which can return headers separete and body separate.

Any help is appreciated. thanks.

Updates
Now i am getting the response as

HTTP/1.1 200 OK
X-Account-Object-Count: 4
X-Account-Bytes-Used: 3072798
X-Account-Container-Count: 3
Accept-Ranges: bytes
Content-Length: 115
Content-Type: application/json; charset=utf-8
Date: Thu, 12 Jan 2012 04:47:36 GMT

[{"name":"a1","count":0,"bytes":0},{"name":"abc","count":0,"bytes":0},{"name":"testing","count":4,"bytes":3072798}]

so the names are in json

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:04:27+00:00Added an answer on May 28, 2026 at 3:04 am

    Seems like it should be as simple as:

    list($headers, $body) = explode("\n\n", $response);
    $bodyValues = explode("\n", $body);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys i have been trying to download it from the below link http://www.enterprisedb.com/products-services-training/pgdownload
I was hoping I could get some help from you guys. The code below
Hopefully I can get help from you guys..I got a simple script below but
Hi Guys I am having trouble on fetching object please see my code below.
Hell Guys! I have used SMTP server to send mail as per below public
I got help with the code below from you guys on forum and the
Hi guys i have my array below and i want to retrieve two rows:as
guys, I would like to you evaluate next code below. As you see, I
hello guys i am try to use the StringUtils.remove Method but the below exception
Hey guys I have an ajax jquery function that receives data from a php

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.