";
$response = '';
} else {
curl_close($ch);
}
if (!is_string($response) || !strlen($response)) {
echo "Failed to get contents.";
$response = '';
}
$thanos_response = json_decode($response);
if (!empty($thanos_response->records)) {
$record = array_shift(array_values($thanos_response->records));
if (!empty($record)) {
$fields = $record->fields;
// Get content that matches "field_name"
foreach ($fields as $field) {
if ($field->fieldName == "Mobile Terms and Conditions") {
$content = $field->value;
}
}
if (!empty($content)) {
echo $content;
}
}
}
?>