note 31386 added to function.fsockopen
| From: | php-general at lists dot php dot net | Date: | Sat, 19 Apr 2003 22:17:58 +0000 |
| Subject: | note 31386 added to function.fsockopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-46824@lists.php.net to get a copy of this message | ||
Hi,
We had a already working script for checking connections but when we moved to another server maybe
with a newest version of php and it started sending the following error:
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in
/home/fpalace/public_html/directory/lista.inc on line 159
Warning: fsockopen() [function.fsockopen]: unable to connect to dc.fastpalaces.com:9999 in
/home/fpalace/public_html/directory/lista.inc on line 159
instead of sending the msg supposed to send if the server is not found. the script is like this:
$fp = fsockopen ($row["url"], $row[port], $errno, $errstr, 30);
if (!$fp) {
echo "<img
src=dead2.gif></td><td><center>n/a</center></td>";
} else {
$data = fread($fp,12);
Thank You
--
http://www.php.net/manual/en/function.fsockopen.php
http://master.php.net/manage/user-notes.php?action=edit+31386
http://master.php.net/manage/user-notes.php?action=delete+31386
http://master.php.net/manage/user-notes.php?action=reject+31386