
 yasir - 2008-03-17 06:31:29 - 
In reply to message 1 from yadnesh
from the $results['Data'] which is raw data you can extract cid: like following...
preg_match_all("/cid:[a-zA-Z0-9@$\.-]+/",$results['Data'],$matches, PREG_PATTERN_ORDER);
foreach($matches[0] as $match){                       
		print getfilenamefromcontentid($match,$results['Related']);	
		}
the function which can pass you file name can be found here..
function getfilenamefromcontentid($ContentID,$related){
	foreach($related as $related)
	{
	if($related['ContentID']==substr($ContentID,4))
	return $related['FileName'];
	}
}