Two simple scripts to display some statistics from mtgox, not much more to say really.
These scripts will work without the json extension installed, you only need php to be able to use this.MtgoxtradeDesctiption: Fetches
https://mtgox.com/code/data/getTrades.php and convert some data into variables for easier usage. (Don't include this on a highly visited page since it uses alot of resources (because mtgox's gettrades.php is a huge file)
Example pageDownloadUsage:Include mtgoxtrade.class to your php file and use the following variables:
$price(x) Get the price of the x'th last transaction (x=0 will get the latest transaction, x=99 will get the 100th last transaction)
$avgprice(x) Gets the average price of the last x transaction (x=99 will give you the avg of last 100 transactions)
$high Gets you the "high" of how many transactions you specified to read (changed with the $chunk variable inside mtgoxtrade.class)
$low Same as $high but for lowest transaction
There's also some variables that you can change in the .class file, just read the commented lines to see what they do.
MtgoxtickDescription: Fetches
https://mtgox.com/code/data/ticker.php and convert some data into variables for easier usage. Use this instead of Mtgoxtrade if what you're looking for is provided by this script since it uses alot less resources.
Example pageDownloadUsage:Include mtgoxtick.class to your php file and use the following variables:
$high Gets the "high" from mtgox (in usd) (last 24hrs i believe? not sure).
$low Gets the "low" from mtgox (in usd).
$vol Gets the volume of money in the market right now (in btc)
$buy Gets the highest buy price (in usd).
$sell Gets the loewst sell price (in usd)
$last Gets the price of the last bitcoin sold (in usd)
If you like this or use this, please donate to 1Awyxgawq52mkYmiAQ9v4sLPXxStVsSGy8 (even a bitcent would be nice)