i try to read contents from any URL with PHP. Here is my code (localhost):
$f = file_get_contents('http://www.youtube.com');
but i get this message:
failed to open stream: A conection attempt failed because the connected party did not properly respond after a period of time, or establised connection failed because connected host has failed to respond.
when i open http://www.youtube.com/ directly it's fine. So there isn't wrong with my connection. Is this failure depend on my php configuration or something else?