August 29, 200817 yr I made a simple php script that uses curl to get the price of a ge item of the runescape site. Just place it on top of a .php file, and then you can call it by using: echo getprice(itemid); You can find the id of an item if you look at it in runescape grand exchange. Like for grain: http://teun.beijers.eu (making it english soon). <?php function getprice($id) { $url = "http://itemdb-rs.runescape.com/viewitem.ws?obj=".$id; $startat = "Market price: "; $stopat = ""; $ch = curl_init(); $timeout = 5; curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $start = curl_exec($ch); curl_close($ch); $exploded = explode($startat,$start); $exploded = explode($stopat,$exploded[1]); $result = str_replace(' ','',nl2br($exploded[0])); return $result; } echo getprice(1947);//get grain price ?>
August 30, 200817 yr Very nice... But I don't see how you get the item ID? Dungeoneering isn't a skill. I'm faster than bots at Sorceress Garden. PM me if you want to chat. My PM is always off. My keyboard is on fire. Want some?
August 30, 200817 yr Author You know how to access all grand exchange prices on the runescape main site? Just click on an item there, and in the adress bar there should be a number at the end of the url, this is the id.
August 30, 200817 yr OMFG THIS IS SO AWESOME. I <3 U. lol. My goals: [b]5M coins:[/b] 4350K+ coins 200k+ items - 2 dec 5M coins - 16 dec I [b]have gotten[/b] my 5M by christmas. -bah this is only here for historical purposes now, I got 20m+ already "fail,well atleast the title,i wont read it with that colours""If you hadn't posted in rainbow I would actually give this a proper read""Colours suck."*I remove colours*"Where did all the colors go!? This is now 40% more likely to be tl;dr'd due to the lack of colors."
August 31, 200817 yr This has MANY applications. There are lready scripts but it's not bad in of itself. Thoroughly retired, may still write now and again
August 31, 200817 yr Now is there a way to write a script that simply alerts you when the prices update? That would sure make 3a buying easier.
August 31, 200817 yr Now is there a way to write a script that simply alerts you when the prices update? That would sure make 3a buying easier. Gl with that, GE website updates like 10 minutes after the prices actually update, I already have such a trick that alerts me when the website updates. And btw I was serious. This is awesome. I am so gonna learn some PHP to make myself a price tracker/calculator (for personal merchanting use) but school is coming so I dont have much time... :/ My goals: [b]5M coins:[/b] 4350K+ coins 200k+ items - 2 dec 5M coins - 16 dec I [b]have gotten[/b] my 5M by christmas. -bah this is only here for historical purposes now, I got 20m+ already "fail,well atleast the title,i wont read it with that colours""If you hadn't posted in rainbow I would actually give this a proper read""Colours suck."*I remove colours*"Where did all the colors go!? This is now 40% more likely to be tl;dr'd due to the lack of colors."
September 2, 200817 yr Author I recommend you to go to the library and get a basic book then, and find a nice online community where you can ask stuff(phphulp.nl, dutch site for me)
Create an account or sign in to comment