|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-08-03 13:24 UTC] gdoroftei at sicme dot ro
Description: ------------ Hi, I use fsockopen to query a list of sites. I wish that script to continue when the connection can't be made (after a give TIMEOUT). I had tryed the last RC but no success. question: if connection isn't made the script will continue after that TIMEOUT? Thanks. Reproduce code: --------------- $this->TIMEOUT = 10; This line is used in a while(). $ptr = @fsockopen($server,$this->PORT,$this->TIMEOUT); Actual result: -------------- When the site is down or the connection can't be made the script is blocked. No error, nothing. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Are you now using something like $ptr = @fsockopen($server,$this->PORT, $errno, $errstr, $this->TIMEOUT); did you try this? if(!$ptr){ echo "$errstr ($errno)"; }