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_Content_Type_Sniffer

Content-type sniffing

Based on the rules in http://tools.ietf.org/html/draft-abarth-mime-sniff-06

This is used since we can't always trust Content-Type headers, and is based upon the HTML5 parsing rules.

This class can be overloaded with SimplePie::set_content_type_sniffer_class()

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/Content/Type/Sniffer.php
Methods summary
public
# __construct( SimplePie_Content_Type_Sniffer $file )

Create an instance of the class with the input file

Parameters

$file
SimplePie_Content_Type_Sniffer
Input file
public string
# get_type( )

Get the Content-Type of the specified file

Returns

string
Actual Content-Type
public string
# text_or_binary( )

Sniff text or binary

Returns

string
Actual Content-Type
public string
# unknown( )

Sniff unknown

Returns

string
Actual Content-Type
public string
# image( )

Sniff images

Returns

string
Actual Content-Type
public string
# feed_or_html( )

Sniff HTML

Returns

string
Actual Content-Type
Properties summary
public SimplePie_File $file
#

File object

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.