Help me please

blackbear

New member
Joined
Jan 24, 2005
Messages
1
Location
The Netherlands
I hope this is the good forum.

I am testing with the php class, which can be found here http://www.directadmin.com/forum/showthread.php?s=&threadid=258

But it does not work. This is my code, it says it works, but when i look in DA is does not work. Nothing is created.

PHP:
<?php

include 'httpsocket.php';

$sock = new HTTPSocket;
$sock->connect('http://62.212.93.42',2222);

$sock->set_login("****","****");

if( $_POST['submit'] ) {

$sock->set_method('POST');

$sock->query('/CMD_SUBDOMAIN',
    array(
        'action' => 'create',
        'domain' => 'netxp.nl',
        'subdomain' => '$_POST[sub]'
    ));

$result = $sock->fetch_body();

echo "The subdomein is created!<br><br>";
echo $result;

} else {

echo '<form method="post" name="form">Subdomain: <input type="text" name="sub"><br><input type="submit" name="submit" value="Create Subdomain!"></form>';

}

?>
 
Back
Top