When I run

$sendURL = "www.example.com";
$fp = fsockopen ($sendURL, "80", $errno, $errstr, 30);

I get

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/trunk/www/modules/webshop/run/payment/paypal/ipn_listener.php on line 51

And when I set $sendURL to "www.sandbox.paypal.com", I get the same warning.

I've been looking into this all morning. What should I do?

Recommended Answers

All 2 Replies

fsockopen takes an integer for the second argument, not a string. Also, be sure to use a secure connection when connecting to PayPal. Their IPN guide explains about this.

R.

When I run

$sendURL = "www.example.com";
$fp = fsockopen ($sendURL, "80", $errno, $errstr, 30);

I get

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/trunk/www/modules/webshop/run/payment/paypal/ipn_listener.php on line 51

And when I set $sendURL to "www.sandbox.paypal.com", I get the same warning.

I've been looking into this all morning. What should I do?

The second argument used to be an integer, with the same results. My code comes directly from the PayPal examples. I am going to check the PayPal IPN guide again for the secure connection.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.