https://github.com/Someguy123/MtGOX-PHP-APIThe class is pretty well documented inside the file. Just include the 1 file at the top of your script, then do for example this
$gox = new Gox('myLongAPIKey', 'Mysecretsecret');
$price = $gox->ticker();
if($price<100){
$gox->buyBTC($amount, $price, "USD");
}
else {
$gox->sellBTC($amount, $price, "USD");
}
Whereas $amount and $price actually have to equal something.
See this for more detail on the various functions of the library, it's code is really easy to understand
https://github.com/Someguy123/MtGOX-PHP-API/blob/master/Gox.class.php