Author

Topic: Looking for a script to show prices (Read 645 times)

sr. member
Activity: 350
Merit: 250
April 23, 2013, 05:01:43 AM
#6
Hi

I'm loking for a PHP script to show the last price on MtGox. This is to be used on a website.
Anyone have this available?
Sure, here you go Smiley
Variable $last is the last price.
Code:
        $ch curl_init('https://data.mtgox.com/api/2/BTCUSD/money/ticker');
                
curl_setopt($chCURLOPT_REFERER'Mozilla/5.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
                
curl_setopt($chCURLOPT_USERAGENT"CakeScript/0.1");
                
curl_setopt($chCURLOPT_HEADER0);
                
curl_setopt($chCURLOPT_RETURNTRANSFER1);
                
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
                
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
                
$mtgoxjson curl_exec($ch);
                
curl_close($ch);
                
$output_mtgox json_decode($mtgoxjson);
                
$output_mtgox_1 get_object_vars($output_mtgox);
                
$mtgox_array get_object_vars($output_mtgox_1['data']);
$data get_object_vars($mtgox_array['last']);
$last $data['value'];        
?>

If this helped you out, I would appreciate a donation of any size - 1JFs4LNkRF4t96r8EJ6FNaaLmcY9SQGEmG
legendary
Activity: 3038
Merit: 1032
RIP Mommy
April 22, 2013, 07:21:01 PM
#5
btcticker.appspot.com
vip
Activity: 1316
Merit: 1043
👻
April 13, 2013, 10:41:43 AM
#4
Can do it for you for 1 BTC + support.
hero member
Activity: 672
Merit: 501
April 13, 2013, 06:46:26 AM
#2
I believe I can help you out. Is there an offer of BTC for this work?

Would you like me to access your server and configure or just provide the code?
newbie
Activity: 29
Merit: 0
April 13, 2013, 06:27:05 AM
#1
Hi

I'm loking for a PHP script to show the last price on MtGox. This is to be used on a website.
Anyone have this available?
Jump to: