function retrieve_latest_content() {
$body = ”;
// The external URL you want to retrieve content from
$url = ‘https://paultan-industrial.com/roicalculator’;
// Use the WordPress HTTP API to get the content
$response = wp_remote_get( $url );
// Check for errors
if ( is_wp_error( $response ) ) {
// Handle the error
$error_message = $response->get_error_message();
echo “Something went wrong: $error_message”;
} else {
// Get the response body content
$body = wp_remote_retrieve_body( $response );
// Output or process the content as needed
echo $body;
}
return $body;
}