From c50260a4d69ab021202b5fad3ef1b591520ea955 Mon Sep 17 00:00:00 2001 From: salfter Date: Mon, 8 Jul 2013 15:35:02 -0700 Subject: [PATCH] bugfix: MtGox API call deprecated --- income.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/income.php b/income.php index 97b87b8..da9467a 100644 --- a/income.php +++ b/income.php @@ -113,11 +113,11 @@ } // get MtGox bid price - $conn=curl_init("https://mtgox.com/api/0/data/ticker.php"); + $conn=curl_init("https://data.mtgox.com/api/2/BTCUSD/money/ticker"); curl_setopt($conn, CURLOPT_FOLLOWLOCATION, true); curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"); curl_setopt($conn, CURLOPT_RETURNTRANSFER, true); - $mtgox_bid=json_decode(curl_exec($conn))->ticker->buy; + $mtgox_bid=json_decode(curl_exec($conn))->data->buy->value; curl_close($conn); // calculate daily income data @@ -189,4 +189,4 @@ '; ?> - \ No newline at end of file +