Skip to content

Instantly share code, notes, and snippets.

@w1lla
Created October 11, 2013 22:05
Show Gist options
  • Save w1lla/6942756 to your computer and use it in GitHub Desktop.
Save w1lla/6942756 to your computer and use it in GitHub Desktop.
<?php
$login = $_GET['login'];
if (!$login) $login = '';
/**
* Maniaplanet Web Services SDK for PHP
*
* @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
* @author $Author: maximeraoust $:
* @version $Revision: 2 $:
* @date $Date: 2011-09-08 18:03:11 +0200 (Thu, 08 Sep 2011) $:
*/
require_once __DIR__.'/libraries/autoload.php';
try
{
$servers = new Maniaplanet\WebServices\Rankings('login_mpws', 'login_pw');
// You will have 20 Melee public non empty and non full servers in France
$list = $servers->getMultiplayerPlayer('SMStorm',$login);
var_dump($list);
}
catch(\Maniaplanet\WebServices\Exception $e)
{
echo "Error!\n";
printf('HTTP Response: %d %s', $e->getHTTPStatusCode(),
$e->getHTTPStatusMessage());
echo "\n";
printf('API Response: %s (%d)', $e->getMessage(), $e->getCode());
echo "\n";
}
echo "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment