What is the potential security risk of using include() function in PHP for external pages?

The potential security risk of using the include() function in PHP for external pages is the possibility of including malicious code from an external source, leading to security vulnerabilities such as code injection or remote code execution. To mitigate this risk, it is recommended to use include_once() or require_once() functions instead, as they ensure that the file is included only once to prevent duplicate code execution.

<?php
    require_once('external_page.php');
?>