August 24, 200916 yr I have a question about the way Tip.It gets its item prices. For example, Iron Ore. The values listed here on Tip.It match perfectly with the GE stuff listed on Runescape's main site; as of this writing, 121g a piece. So, my question is: How does Tip.It load the data from Runescape's highscore and GE servers?
August 24, 200916 yr I have a question about the way Tip.It gets its item prices. For example, Iron Ore. The values listed here on Tip.It match perfectly with the GE stuff listed on Runescape's main site; as of this writing, 121g a piece. So, my question is: How does Tip.It load the data from Runescape's highscore and GE servers? I believe things like google documents can do it etc.
August 24, 200916 yr Author Oops, didn't even notice that forum. :wall: Feel free to move/delete/close this.
August 24, 200916 yr It's a 3 step process. 1: Connect our item id to the GE id. This is pretty much just searching the ge for the item we want and entering the number elsewhere. 2: Use the curl library to get the GE page. That gets the exact same thing you get if you go to it. 3: Parse out the useful information and save it. ~M
August 24, 200916 yr Author That simple, huh? Well, I'm sure it's a lot more involved than that, but it's a good point in the right direction. Thanks for the help, then. :)
August 24, 200916 yr It's a 3 step process. 1: Connect our item id to the GE id. This is pretty much just searching the ge for the item we want and entering the number elsewhere. 2: Use the curl library to get the GE page. That gets the exact same thing you get if you go to it. 3: Parse out the useful information and save it. A basic example in PHP would be: <?php $ch = curl_init(); curl_setopt( $ch, CURLOPT_HEADER, 0 ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $ch, CURLOPT_URL, "url_to_item_page" ); $text = curl_exec( $ch ); // $text now contains the webpage source from the specified URI, so we can parse it using preg_match() etc. // This just so happens to be code I use in my G.E. Crawler if ( preg_match( '/Market price:<\/b>\\s([,.km\\d]+)/i', $text, $match ) ) $ge_market_price = $match[1]; else $ge_market_price = null; // Will put the market price to the page. To make it a pure integer you still need to convert values like 120.5k to 120500 etc echo $ge_market_price; curl_close( $ch ); ?> If you were to be crawling the entire G.E. database then I would highly recommend using multi-threaded cURL, to greatly reduce latency and speed. You have already contacted me about my PHP Crawler code which uses this method. Pure Account: Mrs Destiney -> 82 Attack, 83 Strength, 12 Defence Tank Account: Cyez In Lumb -> 70 Range, 64 Defence. Goals: 85 Range, 85 Defence
August 24, 200916 yr Author It's a 3 step process. 1: Connect our item id to the GE id. This is pretty much just searching the ge for the item we want and entering the number elsewhere. 2: Use the curl library to get the GE page. That gets the exact same thing you get if you go to it. 3: Parse out the useful information and save it. A basic example in PHP would be: *snip* If you were to be crawling the entire G.E. database then I would highly recommend using multi-threaded cURL, to greatly reduce latency and speed. You have already contacted me about my PHP Crawler code which uses this method.Yes, that is correct. And that PHP code should be a great help on how to work with cURL. :)
Create an account or sign in to comment