Loginpage

ISOS6

Verified User
Joined
May 7, 2009
Messages
318
Location
Erbil, Tarin Hills, Iraq
How can I create a login page that retrieves the username and password from Dircetadmin database?

Thus a separate page, instead of the user has two user names and passwords to DirectAdmin, and control panel where the user changes the email address, etc.
 
Your first question did not make any sense to me.

Thanks for reply, but it dosn't work

The link to the api information does work.

i need a script that check if username and password are wrong.

What have you written so far?
 
I want to create a login page with the same username and password where you use the DA.

I just need the steps

Alstå, when you press login, it will check the database for your username and password are correct
 
I want to create a login page with the same username and password where you use the DA.

I just need the steps

Alstå, when you press login, it will check the database for your username and password are correct

So you just want a custom login page on your own web site.
 
No no, I have customized login page.

I have client sites where you can change your address, phone number, etc. This has nothing to do with DirectAdmin, it is connected to another database. So I want the customer to use the same username and password that the customer uses the Contol Panel
 
Can someone check if this works? How do I do so I get some results here:rolleyes:

PHP:
<?php

include 'httpsocket.php';

$sock = new HTTPSocket;
$sock->connect('sitename.com',2222);

$sock->set_login("username","password"); // <--- What should stay here?

$sock->set_method('POST');

$sock->query('/CMD_API_VERIFY_PASSWORD',
	array(
		'user' => 'username', // <--- What should stay here?
		'passwd' => 'password' // <--- What should stay here?
    ));
$result = $sock->fetch_body();

echo $result;

?>
 
I do not know php very well and certainly not the httpsocket.php.

$sock->set_login("username","password"); // <--- What should stay here?

Probably the admin username and password.

$sock->query('/CMD_API_VERIFY_PASSWORD',
array(
'user' => 'username', // <--- What should stay here?
'passwd' => 'password' // <--- What should stay here?
));
$result = $sock->fetch_body();

Probably the username and password you want to check.

What have you tried so far?
 
Back
Top