[Gandi] [API] API request without Pear library

Goal:
Gandi API request from an instance Simple Hosting
Link:
https://gist.github.com/tomedme/75aa5ccdbb7aa3766611402449d8cd7c
Comment:

I was missing the User-Agent header, and that missing field trips out the Gandi API.

Code:

 'utf-8'));
$resource = stream_context_create(array(
  'http' => array(
    'method' => 'POST',
    'header' => $headers,
    'content' => $request,
  )
));
$response = file_get_contents('https://rpc.ote.gandi.net/xmlrpc/', false, $resource);
print_r(xmlrpc_decode($response, 'utf-8'));

Comments are closed, but trackbacks and pingbacks are open.