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

  • Home
  • SEARCH
  • 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 6942061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:58:00+00:00 2026-05-27T12:58:00+00:00

There’s a string like: HTTP/1.1 200 OK Date: Thu, 15 Dec 2011 12:23:25 GMT

  • 0

There’s a string like:

HTTP/1.1 200 OK
Date: Thu, 15 Dec 2011 12:23:25 GMT
Server: Microsoft-IIS/6.0
Content-Length: 2039
Content-Type: text/html


<!DOCTYPE html>
...

Is is possible to send it as headers + body with one command? I know you can use header and echo/print/printf to output body, but since the string I have is exactly in the form I’ve written, to use these functions I’d have to parse it into headers and body.

I’ve tried writing to php://output, but it seems to think headers are the body.

  • 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-27T12:58:01+00:00Added an answer on May 27, 2026 at 12:58 pm

    No, you have to use header(). You could split the string into lines, walk the lines one by one calling header() for each one until you meet the empty line and then echo the rest of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are a few ways to get class-like behavior in javascript, the most common
For some reason, after submitting a string like this Jack’s Spindle from a text
There are several shading languages available today like GLSL, HLSL, CG, which one to
There are many string matching algorithms can be used to find a pattern (string)
I've got a string that has curly quotes in it. I'd like to replace
There are two major fix engines: opensource QuickFix http://www.quickfixengine.org/ commercial Fix Antenna http://www.b2bits.com/trading_solutions/fix_engines/fix_engine_cpp.html What
there's a drop down html element for date for the current month (January 1
There are many methods to override, like initWithNibname: , awakeFromNib , loadView , viewDidLoad
There are things like f.call(...) f.apply(...) But then there's this (1, alert)('Zomg what is
There was some code like this: // Convenience to make things more legible in

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.