([0-9.,]*) @Uis', $content2, $USDmatch); preg_match('#
Bitcoin(.*)([0-9.]*)
([0-9.]*)#Ui', $content3, $BTCprofit); preg_match('#Total received 0([0-9.]*) BTC#Uis', $content4, $BTCrecieved); $BTCprice = str_replace(",", "", $USDmatch[5]); $BTCprice_echo = number_format(round($BTCprice, 0), 0, '.',' '); $BTCday = round($BTCprofit[2] / 1.027787659591288, 8); $BTCmonth = number_format(round($BTCprofit[2] * 30.5 / 1.027787659591288, 8), 8, '.',''); $RURDAYreward = $BTCday * $BTCprice; $RURDAYreward_echo = number_format(round($RURDAYreward, 0), 0, '',' '); $RURMONTHreward = $RURDAYreward * 30.5; $RURMONTHreward_echo = number_format(round($RURMONTHreward, 0), 0, '',' '); $BTCpaid = 0 + $BTCrecieved[1]; $BTCpaid_echo = number_format($BTCpaid, 8, '.',''); $RURpaid = $BTCpaid * $BTCprice; $RURpaid_echo = number_format(round($RURpaid, 0), 0, '',' '); $delta = number_format(round($spent - $RURpaid, 0), 0, '',' '); $DAYSremaining = ($spent - $RURpaid) / $RURDAYreward; $DAYSremaining_echo = round($DAYSremaining); echo "RUR/BTC: $BTCprice_echo ₽

"; echo "BTC/day: $BTCday
"; echo "BTC/month: $BTCmonth
"; echo "
RUR/day reward:
$RURDAYreward_echo ₽

"; echo "RUR/month reward:  $RURMONTHreward_echo ₽
"; echo "
BTC paid:
$BTCpaid_echo

"; echo "RUR paid: $RURpaid_echo ₽
"; echo "RUR delta: $delta ₽"; ?>
  ".round($complete, 0)."% complete"; echo "
Days remaining:
$DAYSremaining_echo

"; echo "Date: " .date('d.m.Y', strtotime("+$DAYSremaining_echo days")) . ""; $spent_echo = number_format(round($spent, 0), 0, '',' '); $RURTHs = number_format(round($spent / $THs, 0), 0, '', ' '); echo "

HW cost: $spent_echo ₽
"; echo "
RUR/THs: $RURTHs ₽

"; $diff = strtotime(date('d.m.Y')) - strtotime($startdate); $days = (int)$diff / (60 * 60 * 24); $realrew =number_format(round($RURpaid / $days, 0), 0, '',' '); echo "
Start date: $startdate
"; echo "
Real RUR/day: $realrew ₽

"; ?>