Title: Easy way to (currently) get MtGox price into PHP variable? Post by: Bit_Happy on January 20, 2012, 10:58:55 PM Please help w/ an easy question:
Note: I'm not looking to need to Authenticate w/ the full API https://en.bitcoin.it/wiki/MtGox/API#Authentication 1) This URl: https://mtgox.com/api/0/data/ticker.php Returns the data in a browser, so it must be possible to do a simple script like this (for example) Code: <?php The above just gives a blank page. This must be easy, can someone please tell me what is wrong? Thank you very much. Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: senbonzakura on January 20, 2012, 11:22:41 PM hope this helps
Code: <?php Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: Bit_Happy on January 20, 2012, 11:28:02 PM Will try it; Thanks senbonzakura.
Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: senbonzakura on January 20, 2012, 11:35:05 PM the above saves the price on database, and then i get the updated price each time from database.
you can alter it any way you like, good luck, tell us if it works for you. Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: Bit_Happy on January 21, 2012, 12:14:27 AM ...tell us if it works for you. After the curl, I just needed the variable, so (for example) Code: //decode from an object to array Yes that helped, thanks :) Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: senbonzakura on January 21, 2012, 12:17:42 AM excellent :)
I am new to this too, I learn by looking at example code, cant code from scratch , so example code saves me time :) are you developing a site or just learning php ? Title: Re: Easy way to (currently) get MtGox price into PHP variable? Post by: Bit_Happy on January 21, 2012, 06:48:25 AM excellent :) I am new to this too, I learn by looking at example code, cant code from scratch , so example code saves me time :) are you developing a site or just learning php ? Similar here, learn by example then make changes and learn even more when trying to fix what's broken. :D |