title: How do I get the content portion of my http header?
body: <p>I'm trying to get the content header query string returned. I'm getting a response but it does not include the query string I am trying to pass. I'm running on an Apache server.</p>
  <pre><code>$postdata = http_build_query(
                  array(
                      'feed_them_social' =&gt; 'yes',
                      'refresh_token'    =&gt; get_option( 'custom_refresh_token' ),
                      'time'             =&gt; esc_html( get_option( 'custom_token_exp_time' ) ),
                  )
              );
              $opts = array('http' =&gt;
                  array(
                      'method' =&gt; 'POST',
                      'header' =&gt; 'Content-type: application/x-www-form-urlencoded',
                      'content' =&gt; $postdata
                  )
              );
  
              $context = stream_context_create($opts);
              
              $command = 'curl --data &quot;' . $context . '&quot; https://my-url.com';
              exec($command, $token);
              $output    = implode('', $token);
              print_r( $output );
  </code></pre>
  <p>I added this to php file on the server I am trying to get a response from. I just want to print out the header content with my query string for now but not having any luck.</p>
  <pre><code>$headers = apache_request_headers();
  
  foreach ($headers as $header =&gt; $value) {
     echo &quot;$header: $value &lt;br /&gt;\n&quot;;
  }
  </code></pre>