SimplePie 1.5 is now available!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie_Enclosure » get_real_type()



class SimplePie_Enclosure {

If the file type from get_type() isn't on our list of supported media types, the feed is probably lying to us (which happens from time to time). This will return the file type that the enclosure likely is. If the type isn't on the list, and SimplePie can't guess what it is based on the file extension, SimplePie will return the noted mime type.


  • Available since SimplePie 1.0.


$feed = new SimplePie();
foreach ($feed->get_items() as $item)
	if ($enclosure = $item->get_enclosure())
		echo $enclosure->get_real_type();

See Also

reference/simplepie_enclosure/get_real_type.txt · Last modified: 2011/03/06 03:56 (external edit)