I have a small PHP script that uses fopen/fread to read the HTML from a remote URL. ? The script strips out the HTML tags and then echos out the text.
With some URLs, however, weird characters appear in the output. ? I assume this has something to do with the character encoding of the remote website but can't figure out how to fix it.
The php script is attached. ? For this project, please update the PHP with any code necessary to make the sample URL (and any other URL) text display properly with the correct encoding.
The PHP file and a screenshot showing the problem are attached.