Thursday, 1 January 2015

file_get_contents() removes XML tags



In the browser the following url http://ift.tt/1Ba8GXu shows up as a regular XML file. but when I'm using file_get_contents('http://ift.tt/1Ba8GXu'); it removes all XML tags and just returns the containing text. Why is this happening and how do I avoid it?


Some response headers:



Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, lzma, sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:kulturarvsdata.se

No comments:

Post a Comment