Unhandled Error!

Syntax error, unexpected 'function' (T_FUNCTION)

Document /modules/cms/classes/cms_controller.php(383) : eval()'d code
Document type PHP document
Line 4
Exception class ParseError
# Call Stack Code Document Line
11 Cms_Controller->evalWithException('?><? php function fetchData($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $result = curl_exec($ch); curl_close($ch); return $result; } /* IG api info kept for posterity, but no longer used. IG token expiration is weird and requires re-auth too frequently // Snapshot Access Token: '614867900.6b0480a.3138980ae5634634976bb152fc2514ba'; // Perini Live Client Id: 484f2f429a39454fb566e8f3d3377324 // Staging Client Id: 3ecfe3d396fc46ae8972dda148efcd67 // Local Client Id: 709047fc9f4b4c548e6e96a3efc3c96b $user_id = '3596554095'; $access_token = '3596554095.709047f.82e3ee2bec2a4a869df6e80fe3d83f93'; $result = fetchData('https://api.instagram.com/v1/users/' . $user_id . '/media/recent/?access_token=' . $access_token); error_log($result); $result = json_decode($result); $this->data['instagram_posts'] = array(); foreach ($result->data as $post) { // $image_url = $post->images->standard_resolution; array_push($this->data['instagram_posts'], $post); } */ $instagram_posts = array(); try { $feed = implode(file('https://websta.me/rss/n/periniranchcountrymarket')); preg_match_all('#\<img\ssrc\=\"([^\"]+)\"#', $feed, $matches); $instagram_posts = $matches[1]; } catch (Exception $err) { error_log($err); } $this->data['instagram_posts'] = $instagram_posts; ?>', 'CMS page PRE action code', 'Country Market', array(0), '1') /modules/cms/classes/cms_controller.php 465
10 Cms_Controller->evalHandler('?><? php function fetchData($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $result = curl_exec($ch); curl_close($ch); return $result; } /* IG api info kept for posterity, but no longer used. IG token expiration is weird and requires re-auth too frequently // Snapshot Access Token: '614867900.6b0480a.3138980ae5634634976bb152fc2514ba'; // Perini Live Client Id: 484f2f429a39454fb566e8f3d3377324 // Staging Client Id: 3ecfe3d396fc46ae8972dda148efcd67 // Local Client Id: 709047fc9f4b4c548e6e96a3efc3c96b $user_id = '3596554095'; $access_token = '3596554095.709047f.82e3ee2bec2a4a869df6e80fe3d83f93'; $result = fetchData('https://api.instagram.com/v1/users/' . $user_id . '/media/recent/?access_token=' . $access_token); error_log($result); $result = json_decode($result); $this->data['instagram_posts'] = array(); foreach ($result->data as $post) { // $image_url = $post->images->standard_resolution; array_push($this->data['instagram_posts'], $post); } */ $instagram_posts = array(); try { $feed = implode(file('https://websta.me/rss/n/periniranchcountrymarket')); preg_match_all('#\<img\ssrc\=\"([^\"]+)\"#', $feed, $matches); $instagram_posts = $matches[1]; } catch (Exception $err) { error_log($err); } $this->data['instagram_posts'] = $instagram_posts; ?>', 'CMS page PRE action code', 'Country Market') /modules/cms/classes/cms_controller.php 520
9 Cms_Controller->eval_page_content(()) /modules/cms/classes/cms_controller.php 198
8 Cms_Controller->open(object(Cms_Page), array(0)) /controllers/application.php 72
7 Application->On404(()) /phproad/modules/phpr/classes/phpr_controller.php 170
6 Phpr_Controller->executeAction('On404', array(0)) /phproad/modules/phpr/classes/phpr_controller.php 84
5 Phpr_Controller->_run('On404', array(0)) /phproad/modules/phpr/classes/phpr_response.php 64
4 Phpr_Response->open404(()) /phproad/modules/phpr/classes/phpr_response.php 37
3 Phpr_Response->open('/country-market') /phproad/system/phproad.php 31
2 include('/var/www/store.periniranch.com/phproad/system/phproad.php') /boot.php 109
1 require_once('/var/www/store.periniranch.com/boot.php') /index.php 114