I am trying to use fsockopen() in PHP and But it's giving me an error. I have tried it on both Windows IIS and Linux redhad 7.3 but both are unable to connect to any URL.
$fp = fsockopen("http://www.abc.com/a.php", "80");
as soon as this code executes it gives me following error:
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) on line 3
Warning: fsockopen(): unable to connect to http://www.abc.com/a.php:80 on line 3
Please tell me why this error is comming........