|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-14 07:54 UTC] gabriel at casaavenida dot com dot br
[2007-04-14 09:54 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
Description: ------------ fsockopen: udp port not open, response always true. Reproduce code: --------------- function service_enable($serverip,$port,$protocol) { error_reporting(1); $fp = fsockopen ("$protocol://$serverip", $port, $errno, $errstr); if(!$fp) { $status = 'NOT OPEN'; } else { $status = 'OPEN'; } return $status; } echo service_enable('127.0.0.1','80',udp); Expected result: ---------------- NOT OPEN Actual result: -------------- OPEN