Battlemetrics API Code Snippets
Output of the server card as an image not as text php code
for webview
<?php $api = 'https://api.battlemetrics.com/servers/'; $server = '12481084'; $api_full = $api . $server; $json = file_get_contents("$api_full"); $response = json_decode($json, true); /*------MAP-----*/ $map = $response['data']['attributes']['details']['map']; echo '<img src="' . $map . '.png"/>'; ?>
open the mods arraylist and let everything output from the array
for Querystring
<?php $api = 'https://api.battlemetrics.com/servers/'; $server = '8860909'; $api_full = $api . $server; $json = file_get_contents ("$api_full"); $response = json_decode($json, true); $modNames = $response['data']['attributes']['details']['modNames']; var_dump($modNames); for($cnt=0; $cnt<count($modNames); $cnt++) { echo $modNames[$cnt]; } ?>
Latest Post: Error Patching Unity Games with AOPS Our newest member: Hans Krauss Recent Posts Unread Posts Tags
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed