April 16, 200917 yr Does anyone have some code (or if somone else has done it, a link) to simply lookup the market price of an item on the Grand exchange in the following format: www.blah.com/ge.php?id=100 and it just returns the figure. Cheers. Do not want anything fancy. Mercifull <3 Suzi "We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12
April 16, 200917 yr Author <?php $id = $_GET['obj']; $url = "http://itemdb-rs.runescape.com/viewitem.ws?obj=".$id; function rs_getprices($url) { $price = array(); $fh = fopen($url, "rb"); while (!feof($fh)) { $line = fgets($fh); if(!$min) sscanf($line, "Minimum price: %s", $min); else if(!$mar) sscanf($line, "Market price: %s", $mar); else if(!$max) sscanf($line, "Maximum price: %s", $max); else break; } fclose($fh); $price['minimum'] = $min; $price['market'] = $mar; $price['maximum'] = $max; return $price; } $item = rs_getprices($url); ?> <?php echo $item['market']; ?> that works but its not sanitised and anyone can put obj=blahblah.com at the end instead of only allowing numbers. Could someone here help me make it so it will only accept numbers and display error messages accordingly etc.? Mercifull <3 Suzi "We don't want players to be able to buy their way to success in RuneScape. If we let players start doing this, it devalues RuneScape for others. We feel your status in real-life shouldn't affect your ability to be successful in RuneScape" Jagex 01/04/01 - 02/03/12
Create an account or sign in to comment