i have one special issue with file_get_contents in PHP, here is code:
$html = file_get_contents("http://www.bratm.sk/trochu-harlem-inspiracie-zaslite-nam-svoj-super-harlem-shake-ak-bude-husty-zverejnime-ho");
it gives me something like this
í}KsŰĆŇčÚŽň!Ç& zRŚ|iI[#)öIkI ĆĺăĹŮÝĹÍý_ŐŃâ[EVßîV%Ů˙ëvĎ ř)śG#óčééééÇĚ çáÜöÁÖÉ;¤áˇ,rřĂăçť[DQ5íeaKÓśOśÉ?ě='šL¸ÔöLßä6ľ4mg_!JĂ÷˘Śu:L§án];9ŇÎV+ި1|C
in some pages from this page i can get proper encoding and content with iconv, but here im helpless, how can i fix that? thx
I think you're looking for something like this
That page is in UTF-8. You need to set the header to match:
header('Content-Type: text/html; charset=utf-8');
Use cURL. This function is an alternative to file_get_contents.