Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get GE price in php script

Featured Replies

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

?>

Xenoxai.png

Very nice...

 

 

 

But I don't see how you get the item ID?

Owned_Nex.png

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?

  • 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.

Xenoxai.png

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."

  • Author

@Homm: in one word: lol

Xenoxai.png

This has MANY applications. There are lready scripts but it's not bad in of itself.

Thoroughly retired, may still write now and again

Now is there a way to write a script that simply alerts you when the prices update? That would sure make 3a buying easier.

lalalasig2.png

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."

  • 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)

Xenoxai.png

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.