http_parse_messageとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > http_parse_messageの意味・解説 

http_parse_message

(PECL)
http_parse_message — HTTP メッセージをパースする

説明

object http_parse_message ( string message )
HTTP の message をパースし、 単純な形式の再帰的な object に格納します。

パラメータ

message
単一の HTTP メッセージ、あるいは複数の連続した HTTP メッセージを含む文字列。

返り値

パースされたメッセージを、階層化されたオブジェクトとして返します。

例 826. http_parse_message() の使用法
<?php
define ('URL', 'http://www.example.com/');
print_r(http_parse_message(http_get(URL, array('redirect' => 3))));
?>
上の例の出力は、たとえば 以下のようになります。

stdClass object
(
  [type] => 2
  [httpVersion] => 1.1
  [responseCode] => 200
  [headers] => Array 
  (
    [Content-Length] => 3
    [Server] => Apache
  )
  [body] => Hi!
  [parentMessage] => stdClass object
  (
    [type] => 2
    [httpVersion] => 1.1
    [responseCode] => 302
    [headers] => Array 
    (
      [Content-Length] => 0
      [Location] => ...
    )
    [body] => 
    [parentMessage] => ...
  )
)

    





英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「http_parse_message」の関連用語

http_parse_messageのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



http_parse_messageのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2025 by the PHP Documentation Group.

©2025 GRAS Group, Inc.RSS