<?php
$options = [
'debug' => true,
'allow_redirects' => true,
'headers' => [
'User-Agent' => 'habbocreate.com/1.0',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
]
];
Route::get('test/profile', function() use($options) {
try {
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://www.habbo.com/api/public/users?name=ben.', $options);
dd($response);
}
catch (\Exception $e) {
dd($e);
}
});
Route::get('test/badges', function() use($options) {
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://www.habbo.com/gamedata/external_flash_texts/1', $options);
dd($response);
});
Comments