PHP程序访问网站超时

My PHP program access a website which is very slow to open, therefore I get a warning message:

Warning: file_get_contents(http://www.example.com): 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. in C:\xampp\htdocs\mezi.php on line 155.

Line 155 code: $html = file_get_contents('http://www.example.com');

My question is: how to increase time allowed to wait for slow website? I have already increased allowed execution time by adding set_time_limit(100); to my code. But this does not help.

This is actually a socket session that's being created behind the scenes, therefore the correct value in php.ini would actually be

default_socket_timeout