sky
Verified User
- Joined
- Nov 12, 2004
- Messages
- 318
Hello
I have been using DA's API for a while now and on one server it cant seem to connect anymore.
This is what i send :
(i tampered the login & password)
This is what i get back :
+ the login form.
The PHP snippet :
I use the HTTPSocket class and custom PHP scripting for creating domain aliases and ftp accounts for a project.
I also tried using the API with the da_admin account, but no luck.
I tried desqactivating the firewall in case ... but no luck.
Did something change in DA API system ?
Thx for your help,
Sky
Edit : tested the login and password direct with the DA classic web interface : all's fine.
This problem is only when login in with the API.
I have been using DA's API for a while now and on one server it cant seem to connect anymore.
This is what i send :
Code:
GET /CMD_API_DOMAIN_POINTER?domain=domain.fr&action=add&from=test.domain.fr&alias=yes HTTP/1.0 User-Agent: HTTPSocket/2.6 Host: 91.121.183.75:2222 Accept: */* Connection: Close Authorization: Basic FDHSDJFKGSHFDLKGJFDGHLSKJGHFDSLGK=
This is what i get back :
Code:
HTTP/1.1 200 OK Server: DirectAdmin Daemon v1.36.0 Registered to Name Surname Set-Cookie: session=; path=/; HttpOnly Connection: close Cache-Control: no-cache Pragma: no-cache X-DirectAdmin: unauthorized Content-Type: text/html
The PHP snippet :
Code:
$sock = new HTTPSocket;
$sock->connect($CFG['server_ip'], 2222);
$sock->set_login($CFG['server_login'], $CFG['server_pass']);
// sub domain
$sock->query('/CMD_API_DOMAIN_POINTER',
array(
'domain' => 'domain.fr',
'action' => 'add',
'from' => $domaine,
'alias' => 'yes'
)
);
I use the HTTPSocket class and custom PHP scripting for creating domain aliases and ftp accounts for a project.
I also tried using the API with the da_admin account, but no luck.
I tried desqactivating the firewall in case ... but no luck.
Did something change in DA API system ?
Thx for your help,
Sky
Edit : tested the login and password direct with the DA classic web interface : all's fine.
This problem is only when login in with the API.
Last edited: