I assume your full code look like this below.
[PHP] $query_geturl = mysql_query("select * from sites");
while($geturl = @mysql_fetch_array($query_geturl, MYSQL_ASSOC)) {
$fp = fsockopen ($url['host'], ($url['port'] > 0 ? $url['port'] : 80), $errno, $errstr, $timeout);
if (!$fp) {
$query_status = mysql_query("update sites set status = '2' where url = '$usersite'");
}
else {
//blah blah blah...
}
}
[/PHP]
Where does '$url' come from? '$url' means '$geturl'?
Also try like this below. Hope it helps.
[PHP] $query_geturl = mysql_query("select * from sites");
while($geturl = @mysql_fetch_array($query_geturl, MYSQL_ASSOC)) {
$fp = fsockopen ($geturl['host'], ($geturl['port'] > 0 ? $geturl['port'] : 80), $errno, $errstr, $timeout);
if (!$fp) {
$query_status = mysql_query("update sites set status = '2' where url = '$usersite'");
}
else {
//blah blah blah...
}
}
[/PHP]