Skip to content

Instantly share code, notes, and snippets.

@enko
Forked from anonymous/gist:6648750
Created September 21, 2013 09:15
Show Gist options
  • Save enko/6648828 to your computer and use it in GitHub Desktop.
Save enko/6648828 to your computer and use it in GitHub Desktop.
<?php
require_once 'vendor/autoload.php';
use Guzzle\Http\Client;
$client = new Client('http://192.168.0.5:5280');
$data = array(
'username' => 'foo',
'password' => 'bar',
'server' => 'boese-ban.de',
'ip' => '127.0.0.1',
'mail' => 'tim@bandenkrieg.hacked.jp',
'auth_token' => 'ZvO9Ca4Bseaevt4vEAQD6aVW',
);
$request = $client->post('/register_account/', array(
'Host','boese-ban.de:5280',
'Content-Type','application/encoded',
'Content-Transfer-Encoding','base64',
), base64_encode(json_encode($data)));
$response = $request->send();
echo $response->getBody();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment