Hi, i currently have a page that performs functions determined by other parameters set on the site. The page runs an API script for de-captcher.com that submits & retrieves completed captchas. So if i have 5 accounts on the site set to submit & retrieve captchers it submits 1 at a time.
Now my problem is, it at random times just stops working which forces me to page refresh or click the link that activates the function again. It logs into the site perfectly fine & sends & retrieves completed captcha's fine, it just at random points stops. I thought it was a time-out problem & i put in anti time-out code but that didnt work. I contacted my host to ask if they limit the script run times & they said no my scripts can run as long as desired. I contacted de-captcher.com support & they looked on my account & no time-outs was recorded so it must be a script problem.
When the script is running, the page in status bar continue's to say waiting for mydomain.com & as long as i see that, i know its working, however it stops working when it changes to Done & its not completed its task.
Some times it almost complete's its task, sometimes it fails to even complete the first task.
Here is the page that does the job, i hope someone can help because im an amature coder & i had help with this & i've always had great help from this forum in the past so here i am.
if (preg_match('/It will take <b>([\d|,]+)<\/b> of your <b>([\d|,]+)<\/b> rage/', $page, $rage))
{
print( "Incorrect return - Naming picture ".$major_id."/".$minor_id." as bad\n" );
$ccp->picture_bad2( $major_id, $minor_id );
}
else
{
$page = curl("http://" . $server[$siteConfig['userServer']] . ".outwar.com/raidmembers.php?raidid=".$raidid['raidid']);
preg_match("/(\d*) people have joined this raid/", $page, $matches);
mysql_query("UPDATE `raidbar_raidid` SET `JOINED` = '" . $matches[1] . "' WHERE `rdId` = '".$raidbarId."'");
print( " got return for ".$row['owid'].": text = '".$text."', submitted to Outwar" );
$i = $max_trys;
}
break;
case ccERR_BALANCE:
print( "not enough funds to process a picture, balance is depleted" );
break;
case ccERR_TIMEOUT:
print( "picture has been timed out on server (payment not taken)" );
break;
case ccERR_OVERLOAD:
print( "temporarily server-side error server's overloaded, wait a little before sending a new picture" );
break;
case ccERR_STATUS:
print( "local error." );
break;
case ccERR_NET_ERROR:
print( "network troubles, better to call ccproto_login() again" );
break;
case ccERR_TEXT_SIZE:
print( "size of the text returned is too big" );
break;
case ccERR_GENERAL:
print( "server-side error, better to call ccproto_login() again" );
break;
case ccERR_UNKNOWN:
print( "unknown error, better to call ccproto_login() again" );
break;
$result = mysql_query("SELECT `JOINED` FROM `raidbar_raidid` WHERE rdId = '".$raidbarId."'");
$row = mysql_fetch_array($result);
echo $row['JOINED'] . " people have joined this raid";
}
?>
</pre>
</body>
</html>
Bookmarks