I have some html files stored in AWS S3, and I access them with AWS CloudFront.
I need to call them from my PHP code, like that:
echo file_get_contents('https://mycdnurl.com/myhtmlfile.html');
It works, but it ignores all line breaks and sometimes it breaks the code because of some piece of javascript code inside the html like that:
// some javascript comment
var test = test
Turns into:
// some javascript comment var test = test
If I access the file directly from browser, it works nice. But I need to call from PHP without iframe.
I tried to search but I didn't find anything useful.