How to Enable fsockopen()
The fsockopen() php command is supported on all of our shared and reseller servers, along with most of our VPS and Dedicated servers too. The purpose of this command is to open an outbound connection via a specific port to an external server. A common issue with using this command is the firewall on your server may not be configured to allow the connection that you are trying to make, please see below for explanations if you are getting errors on your site.
- Warning: fsockopen() [function.fsockopen]: unable to connect to www.domain.com:8080 (Connection refused) in /home/cpuser/public_html/fsock.php on line 2
Connection refused (111)
- Warning: fsockopen() [function.fsockopen]: unable to connect to www.domain.com:8080 (Connection timed out) in /home/cpuser/public_html/fsock.php on line 2
Connection timed out (110)