Coreserverのホスト情報登録

CoreserverSSH使う前にホスト情報登録をやるのがめんどいのでちょろっとphpで書いた。とりあえず動いた。

<?php
error_reporting(E_ALL);
require_once 'HTTP/Client.php';

define ('ID', 'my_id');
define ('PASS', 'my_pass');
define ('URL', 'https://ss1.coressl.jp/www.s72.coreserver.jp/jp/admin.cgi?telnet=1');
//管理画面のアドレス
define ('SSH' , rawurlencode('SSH登録'));
define ('IP', file_get_contents('http://dyn.value-domain.com/cgi-bin/dyn.fcg?ip'));
//自ゲートウェイのIP

$cl = new HTTP_Client();
$cl->post(URL, 
          array('id' => ID, 'pass' => PASS,
                'ssh2' => SSH,
                'remote_host' => IP
                )
          );

//var_dump ($cl->currentResponse());