_openid_parse_message

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/openid/openid.inc, строка 161

Версии
6
_openid_parse_message($message)

Convert a direct communication message into an associative array.

▾ 2 функции вызывают _openid_parse_message()

openid_association in modules/openid/openid.module
Attempt to create a shared secret with the OpenID Provider.
openid_verify_assertion in modules/openid/openid.module
Attempt to verify the response received from the OpenID Provider.

Код

<?php
function _openid_parse_message($message) {
  $parsed_message = array();

  $items = explode("\n", $message);
  foreach ($items as $item) {
    $parts = explode(':', $item, 2);

    if (count($parts) == 2) {
      $parsed_message[$parts[0]] = $parts[1];
    }
  }

  return $parsed_message;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему