hi run in cli script.php
Opened this issue · 1 comments
crypto-mania commented
hi !
this script run good in cli....
just not re-send out payouts
this script run manual for payouts? ex: mysite.com/script.php?time or ?lastPayout
crypto-mania commented
HI im a copied code :
if (time() - $lastPayout > $config['payout-check'])
{
$lastPayout = time();
$query = mysql_query('SELECT * FROM `transactions` WHERE `state` = 1 ORDER BY `date` ASC;');
while($row = mysql_fetch_assoc($query))
{
$txout = $client->sendfrom($config['ponziacc'], $row['address'], round((float)$row['topay'], 4) - ($row['amount'] * $config['fee']));
mysql_query("UPDATE `transactions` SET `state` = 2, `out` = '" . $txout . "' WHERE `id` = " . $row['id'] . ";");
print($row['topay'] . " " . $config['val'] ." sent to " . $row['address'] . ".\n");
}
}
write in new php ex: mysite.com/payouts.php
and payouts is ok
this not automated in script.php ?