karthikeyan_coder Posted February 26, 2007 Share Posted February 26, 2007 i request two ports 1. 443 2. 80 313 if($port==443) { 314 $fp = pfsockopen("ssl://".$host, $port, &$errno, &$errstr); 315 } 316 else { 317 $fp = pfsockopen($host, $port, &$errno, &$errstr); 318 } i am getting two errors.. Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 314 Warning: pfsockopen() [function.pfsockopen]: unable to connect to www.hostdomain1.com:443 in /home/public_html/new/index.php on line 314 Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 317 Warning: pfsockopen() [function.pfsockopen]: unable to connect to hostdomain2.com:80 in /home/public_html/new/index.php on line 317 i have two hosts.. hostdomain1.com hostdomain2.com i need to connect hostdomain1.com's ssl & hostdomain2.com's http ... any idea? Link to comment https://forums.phpfreaks.com/topic/40248-pfsockopen-ssl-http/ Share on other sites More sharing options...
shoz Posted February 26, 2007 Share Posted February 26, 2007 i am getting two errors.. Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 314 Warning: pfsockopen() [function.pfsockopen]: unable to connect to www.hostdomain1.com:443 in /home/public_html/new/index.php on line 314 Warning: pfsockopen() [function.pfsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/public_html/new/index.php on line 317 Warning: pfsockopen() [function.pfsockopen]: unable to connect to hostdomain2.com:80 in /home/public_html/new/index.php on line 317 The errors indicate that pfsockopen can't resolve the domain names. It's a DNS issue. Link to comment https://forums.phpfreaks.com/topic/40248-pfsockopen-ssl-http/#findComment-194727 Share on other sites More sharing options...
ShogunWarrior Posted February 26, 2007 Share Posted February 26, 2007 I had this problem with my old host and you won't be able to make any remote requests (RPC/FSOCK/FOPEN) until your host fixes this. Link to comment https://forums.phpfreaks.com/topic/40248-pfsockopen-ssl-http/#findComment-194733 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.