Bitcoin Forum
May 09, 2024, 02:06:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Looking for a script to show prices  (Read 629 times)
havardr (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 0



View Profile
April 13, 2013, 11: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?
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
1715220364
Hero Member
*
Offline Offline

Posts: 1715220364

View Profile Personal Message (Offline)

Ignore
1715220364
Reply with quote  #2

1715220364
Report to moderator
BigBitz
Hero Member
*****
Offline Offline

Activity: 672
Merit: 501



View Profile
April 13, 2013, 11: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?

Tips BTC --> 1BS2sYvy3T1cpNhie6CVFMcUrHa84a8mPa <-- Thanks! || Tips [LTC] --> LaytYJNCha7z7zcws5a2o2GWWjvWfDCGkr <--
fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
April 13, 2013, 11:54:39 AM
 #3

look here:
https://github.com/neofutur/bitcoin_simple_php_tools/blob/master/textprice/pricetobtc.txt.php
🏰 TradeFortress 🏰
Bitcoin Veteran
VIP
Legendary
*
Offline Offline

Activity: 1316
Merit: 1043

👻


View Profile
April 13, 2013, 03:41:43 PM
 #4

Can do it for you for 1 BTC + support.
TheButterZone
Legendary
*
Offline Offline

Activity: 3052
Merit: 1031


RIP Mommy


View Profile WWW
April 23, 2013, 12:21:01 AM
 #5

btcticker.appspot.com

Saying that you don't trust someone because of their behavior is completely valid.
n4ru
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
April 23, 2013, 10: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:
<?php
        $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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!