I have the best option for you.
Avoid file_get_contents , cURL user.
Let me show you one example:
$url = 'http://www.yoururl.com'; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, false); $data = curl_exec($curl); curl_close($curl);
Note. Do you feel an encoding problem, add this: curl_setopt($curl, CURLOPT_ENCODING ,"");
Thanks.
source share