Bitcoin Forum
October 17, 2017, 07:53:36 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Looking for a script to show prices  (Read 547 times)
havardr
Newbie
*
Offline Offline

Activity: 29



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?
1508226816
Hero Member
*
Offline Offline

Posts: 1508226816

View Profile Personal Message (Offline)

Ignore
1508226816
Reply with quote  #2

1508226816
Report to moderator
1508226816
Hero Member
*
Offline Offline

Posts: 1508226816

View Profile Personal Message (Offline)

Ignore
1508226816
Reply with quote  #2

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

Posts: 1508226816

View Profile Personal Message (Offline)

Ignore
1508226816
Reply with quote  #2

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

Activity: 560



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



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
VIP
Legendary
*
Offline Offline

Activity: 910


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

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

Activity: 1932


Nemo me impune lacessit


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

btcticker.appspot.com

n4ru
Sr. Member
****
Offline Offline

Activity: 322



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

ETH-Nova - Fully Automated OC/PL/P-state/Mining/Monitoring for Windows
ETH: 0x00972cd6a2c6786afbcc24ca592b8c86f33f747a / BTC: 1n4ruYy5QWbTDBbPEyBRWwj1Ni4U4Sz5P
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!