note 86621 deleted from function.fsockopen by cmb

From: Date: Sun, 07 Jul 2019 07:54:00 +0000
Subject: note 86621 deleted from function.fsockopen by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211497@lists.php.net to get a copy of this message
Note Submitter: laisebrown at gmail dot com ---- When you're connecting through a proxy server you can't rely on fsockopen returning false to indicate that the connection has failed. (This also applies to fgets and fwrite.) To check whether the proxy succeeded in contacting the real target host, you need to look for the http response code in the headers that get returned. Typically, if the proxy was unable to reach the host, you'll find a line containing something like: HTTP/1.0 503 Service Unavailable

« previous php.notes (#211497) next »