PHP Classes

File: grand-exchange.example.php

Recommend this page to a friend!
  Classes of Petter Kjelkenes   Runescape Tools   grand-exchange.example.php   Download  
File: grand-exchange.example.php
Role: Example script
Content type: text/plain
Description: Example of GE features
Class: Runescape Tools
Create accounts and retrieve Runescape game data
Author: By
Last change:
Date: 13 years ago
Size: 1,158 bytes
 

Contents

Class file image Download
<?php

// Require class file....
require_once('runescape.class.php');

// Create the Runescape object.
$RS = new Runescape();


// Get the specific item by using the GE method ItemByName. Notice that it must be correct.
$mask = $RS->GE()->ItemByName("Green h'ween mask");

// Now get more info like min price, max price, pricechange30,90,180!
$mask->getInfo();


echo
"<h1><a href='",$mask->link,"'>The Green h'ween mask</a></h1>";


echo
"The mask is currently worth (Market price): <b>", $mask->price ,"</b><br />";

echo
"(Min price): <b>", $mask->minprice ,"</b><br />"; // Can only show minprice if getInfo() is run on the item.
echo "(Max price): <b>", $mask->maxprice ,"</b><br />"; // Can only show minprice if getInfo() is run on the item.
echo "(Price change last 30 days percent): <b>", $mask->pricechange30 ,"</b><br />"; // Can only show minprice if getInfo() is run on the item.



echo "The latest GP change was: <b>", $mask->pricechange ,"</b><br />";

echo
"<h2>Graph last 60 days..</h2> <img src='", $mask->getPriceGraph(1) ,"' /><br />";



// Also see GE()->Search() for searching up many items.
?>