Campaign 2 General Info And FAQ
Дата: 13.11.2013 02:41:43
Stormtrail, on Nov 07 2013 - 05:18, said: Also, Q and H, can we strongly request/suggest that Fame points be
provided as part of an API or some other Wargaming approved
technique? Because I would guess that by the weekend, your "alley
of fame" is going to start getting scraped, and hard, and probably
put away wet. The sad thing is, that its not even that useful, but
its the only information we have access to...Hypnotik: Beep, you're very close, but it looks like you're missing the
options/headers.
PHP: (you can change to whatever other language you may use)
$options = array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0', CURLOPT_HTTPHEADER => array( 'Referer: http://worldoftanks....ventmap/alley/', 'X-Requested-With: XMLHttpRequest' )); $ch = curl_init(); curl_setopt_array($ch, $options); curl_setopt($ch, CURLOPT_URL, 'http://worldoftanks.com/clanwars/eventmap/alley/ratings/?page=XXXXXXXX&page_size=YYYYYYY'); XXXXX = Page # (your script will have to determine number of pages based on the second variable in the URL based on the total # of results, which also gets returned in the first result)
YYYYY = # of results / page - I believe this will max out at 100
to check for success, check the value of the json's "status" index. It should read "ok" if successful.
You'll also see the fields "total_count" (total # of players with FP), "updated_at" (unix timestamp of the last update), and "users_info" (where all the player data is)
.
.
.
______________________________________
.
.
.
The OP has also been made current and (hopefully) a bit more useful for finding resources. Enjoy.
PHP: (you can change to whatever other language you may use)
$options = array( CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0', CURLOPT_HTTPHEADER => array( 'Referer: http://worldoftanks....ventmap/alley/', 'X-Requested-With: XMLHttpRequest' )); $ch = curl_init(); curl_setopt_array($ch, $options); curl_setopt($ch, CURLOPT_URL, 'http://worldoftanks.com/clanwars/eventmap/alley/ratings/?page=XXXXXXXX&page_size=YYYYYYY'); XXXXX = Page # (your script will have to determine number of pages based on the second variable in the URL based on the total # of results, which also gets returned in the first result)
YYYYY = # of results / page - I believe this will max out at 100
to check for success, check the value of the json's "status" index. It should read "ok" if successful.
You'll also see the fields "total_count" (total # of players with FP), "updated_at" (unix timestamp of the last update), and "users_info" (where all the player data is)
.
.
.
______________________________________
.
.
.
The OP has also been made current and (hopefully) a bit more useful for finding resources. Enjoy.
BeepBeep123, on Nov 07 2013 - 15:05, said: .+1. please provide API.
.
please don't make me scrape the back alley of fame.
Hypnotik:
BeepBeep123, on Nov 07 2013 - 15:54, said: web experts: halp! what step am i missing?Hypnotik:
Campaign 2 General Info And FAQ














