Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

SimplePie A PHP-Based RSS and Atom Feed Framework. Takes the hard work out of managing a complete RSS/Atom solution.

Author: Ryan Parman
Author: Sam Sneddon
Author: Ryan McCue
Copyright: 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
License: http://www.opensource.org/licenses/bsd-license.php BSD License
File Size: 518 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SimplePie_HTTP_Parser:: (18 methods):
  __construct()
  parse()
  has_data()
  is_linear_whitespace()
  http_version()
  status()
  reason()
  new_line()
  name()
  linear_whitespace()
  value()
  value_char()
  quote()
  quote_char()
  quote_escaped()
  body()
  chunked()
  prepareHeaders()


Class: SimplePie_HTTP_Parser  - X-Ref

HTTP Response Parser

__construct($data)   X-Ref
Create an instance of the class with the input data

param: string $data Input data

parse()   X-Ref
Parse the input data

return: bool true on success, false on failure

has_data()   X-Ref
Check whether there is data beyond the pointer

return: bool true if there is further data, false if not

is_linear_whitespace()   X-Ref
See if the next character is LWS

return: bool true if the next character is LWS, false if not

http_version()   X-Ref
Parse the HTTP version


status()   X-Ref
Parse the status code


reason()   X-Ref
Parse the reason phrase


new_line()   X-Ref
Deal with a new line, shifting data around as needed


name()   X-Ref
Parse a header name


linear_whitespace()   X-Ref
Parse LWS, replacing consecutive LWS characters with a single space


value()   X-Ref
See what state to move to while within non-quoted header values


value_char()   X-Ref
Parse a header value while outside quotes


quote()   X-Ref
See what state to move to while within quoted header values


quote_char()   X-Ref
Parse a header value while within quotes


quote_escaped()   X-Ref
Parse an escaped character within quotes


body()   X-Ref
Parse the body


chunked()   X-Ref
Parsed a "Transfer-Encoding: chunked" body


prepareHeaders($headers, $count = 1)   X-Ref
Prepare headers (take care of proxies headers)

param: string  $headers Raw headers
param: integer $count   Redirection count. Default to 1.
return: string