What are some best practices to follow when including content from external pages in PHP to maintain the integrity of the original content?

When including content from external pages in PHP, it's important to sanitize the content to prevent any potential security vulnerabilities such as XSS attacks. One way to do this is by using PHP's `strip_tags()` function to remove any HTML tags from the external content before displaying it on your page.

// Fetch content from external page
$external_content = file_get_contents('https://www.example.com/external-page');

// Sanitize the content to prevent XSS attacks
$sanitized_content = strip_tags($external_content);

// Display the sanitized content on your page
echo $sanitized_content;