i have a code that is working
$html = file_get_contents('https://www.imdb.com/');
echo $html;
also this code working too
$html = file_get_contents('https://www.google.com/');
echo $html;
but its not working with some urls like this one:
$html = file_get_contents('https://www.rottentomatoes.com/');
echo $html;
and i get this error
Warning: file_get_contents(https://www.rottentomatoes.com/tv/friends): failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
and i don't understand why this happening? and website loads in browser with no problem and no need for vpn (but some other url might need).
i also used Simple HTML DOM Parser and in 1.9 version i get this error and in 2.0RC2 version i get empty $html
and NULL
value.
can someone help me please?