private static function cecf_call_data_url($data_url) { $user_key = base64_encode(CE_Plugin_Settings::get_user_key()); //encode user key $output = null; try { //use cURL to contact server and get response with data $ch = curl_init($data_url); curl_setopt($ch, CURLOPT_HTTPHEADER, array('UserKey:' . $user_key)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); $output1 = curl_close($ch); $output = simplexml_load_string($output); } catch (Exception $e) { trigger_error("Unable to retrieve information from data source."); } return $output; }