===== Press Releases ===== Below is a list of Press Releases \\ function listPRs ($feedURL, $trim_strBEG, $trim_strEND) { # INSTANTIATE CURL. $curl = curl_init($feedURL); # CURL SETTINGS. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // Return as string rather than outputting it directly curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); // Only wait 5 seconds for a connection # GRAB THE XML FILE. $xmlCFAListings = curl_exec($curl); curl_close($curl); # SET UP XML OBJECT. $xmlObjCFAListings = simplexml_load_string( $xmlCFAListings, 'SimpleXMLElement', LIBXML_NOCDATA ); // $tempCounter = 0; foreach ( $xmlObjCFAListings->channel->item as $item ) { # DISPLAY ONLY 10 ITEMS. // if ( $tempCounter < 11 ) { echo "
  • guid}\" target=\"_blank\">{$item->title}

    "; if ($trim_strBEG) { # TRIM EXTRANEOUS LINK AT END OF DESCRIPTION $begPos = strpos($item->description, $trim_strBEG); $endPos = strpos($item->description, $trim_strEND, $begPos); if ($begPos > 0 && $endPos > $begPos) { $trimLink = substr_replace($item->description, "", $begPos, $endPos); echo "{$trimLink}
  • "; } else { echo $item->description . ""; } } else { echo $item->description . "
    "; } // } // $tempCounter += 1; } } echo "
    ";