Creating accounts with a windows program, possible?

John D

Verified User
Joined
Jan 23, 2005
Messages
5
Hey,
I have been coding a windows program for billing and customer management for over a year now.

I would now like to integrate control panels and DA is one of the first I want to include.

The program is www.BillVoice.com and is coding in Delphi for the windows app and PHP for an online section.

I would like to do the functions that PHP scripts can do, but through the Windows program using Delphi.

Does anyone know is this is possible?

Thanks
John
 
Hi John,

What you're looking to do is entirely possible. The "calls" that PHP scripts make are simply GET and POST requests to the DirectAdmin API:

http://directadmin.com/api.html

The API is well documented and you should have no trouble following along. As a starting point you may want to write a class in Delphi that simple allows you to send POST and GET requests to a specific URL. If you can do this, you can use the API and parse its results easily.

Best of luck!
 
Hey there,
Thanks very much.
Added a component now for posting get and post requests to a site.

I haven't worked with the DA API at all before and I am not a PHP coder, I have a few coders that are doing all PHP but I would like to get an idea of how the API works for DA.

Here is a sample post request:

HTTPQuery1.URL:='http://search.yahoo.com/bin/search';
HTTPQuery1.Action:=qmGET;
HTTPQuery1.Params.Values['p']='Test';
Memo1.Lines.Text:=HTTPQuery1.Submit;

I understand all this code (I am a delphi coder so this isn't a problem) but I am confused on the working with the DA API using the POST and GET requests.

Where should I post the actual request to?
I can also change the port to 2222 for DA.

Are there samples available for the API? I found a link from the forum but the domain wasn't working.

Thanks again
John
 
Anywhere we can test API fuctions by the way?

Would the demo on the site work for this?

I think I have got it sussed out now but have nowhere to test it out to make sure.

Thanks
John
 
The demo site is a specially configured site on a live server; every DA system can host demo sites.

If you don't have a DA server I'd suggest you get one. A monthly license isn't expensive.

We offer use of a testbed server to hosting companies needing to try something, and to open source projects. It doesn't sound as if you qualify but if you think you do, email me at the email address in my sig.

Jeff
 
Thanks but the program is just free, not open source.

Does DA offer anything for developers to test?

Don't really want to setup a full server just for testing a few API fuctions.

Thanks
John
 
DA does not.

If you don't want to set up a server for the test perhaps you might rent a VPS for a month.

Tektonic is a good solution for self-managed VPS DA servers; they start at $35/month with a $1 setup fee. So that makes the total investment only $35.

Jeff
 
Back
Top