SimplePie: PHP-based RSS and Atom feed handling
 
  • Overview
  • Demo
  • Blog
  • Download
  • Documentation
  • API Docs
  • Support
  • Issue Tracker
  • FAQ
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • SimplePie
    • API
    • Caching
    • HTTP
    • Parsing

Classes

  • SimplePie_Content_Type_Sniffer
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Net_IPv6

Class SimplePie_HTTP_Parser

HTTP Response Parser

Package: SimplePie\HTTP
Copyright: 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
License: BSD License
Author: Ryan Parman
Author: Geoffrey Sneddon
Author: Ryan McCue
Located at SimplePie/HTTP/Parser.php
Methods summary
public
# __construct( string $data )

Create an instance of the class with the input data

Parameters

$data
string
Input data
public boolean
# parse( )

Parse the input data

Returns

boolean
true on success, false on failure
protected boolean
# has_data( )

Check whether there is data beyond the pointer

Returns

boolean
true if there is further data, false if not
protected boolean
# is_linear_whitespace( )

See if the next character is LWS

Returns

boolean
true if the next character is LWS, false if not
protected
# http_version( )

Parse the HTTP version

protected
# status( )

Parse the status code

protected
# reason( )

Parse the reason phrase

protected
# new_line( )

Deal with a new line, shifting data around as needed

protected
# name( )

Parse a header name

protected
# linear_whitespace( )

Parse LWS, replacing consecutive LWS characters with a single space

protected
# value( )

See what state to move to while within non-quoted header values

protected
# value_char( )

Parse a header value while outside quotes

protected
# quote( )

See what state to move to while within quoted header values

protected
# quote_char( )

Parse a header value while within quotes

protected
# quote_escaped( )

Parse an escaped character within quotes

protected
# body( )

Parse the body

protected
# chunked( )

Parsed a "Transfer-Encoding: chunked" body

Properties summary
public float $http_version 0.0
#

HTTP Version

public integer $status_code 0
#

Status code

public string $reason ''
#

Reason phrase

public array $headers array()
#

Key/value pairs of the headers

public string $body ''
#

Body of the response

protected string $state 'http_version'
#

Current state of the state machine

protected string $data ''
#

Input data

protected integer $data_length 0
#

Input data length (to avoid calling strlen() everytime this is needed)

protected integer $position 0
#

Current position of the pointer

protected string $name ''
#

Name of the hedaer currently being parsed

protected string $value ''
#

Value of the hedaer currently being parsed

Show some love! Wishlists for Geoffrey, Ryan P., and Ryan M.

SimplePie is © 2004–2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors. Licensed under the BSD License. Hosted thanks to Matt Mullenweg, API documentation generated by ApiGen 2.6.1. Variation on the Feed Icon by Wolfgang Bartelme.