![]() |
|
#1
|
|||
|
|||
|
PHP class for communicating with DA
Hey.
This is a small PHP class put together to help communicate with DirectAdmin. It is simple enough, and most anyone can make good use of it. Current Version: v2.6 Last updated 2005-07-29 Download: php-source or tarball Numerous implementation examples are located here. Pretty nifty, eh?
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool Last edited by l0rdphi1; 01-06-2009 at 01:31 AM. |
|
#2
|
|||
|
|||
|
An additional method is to simply use fopen(), file(), or getfilecontents() on the full URL. For example:
PHP Code:
|
|
#3
|
|||
|
|||
|
Quote:
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#4
|
|||
|
|||
|
How would you send your information to CMD_ACCOUNT_USER to create an account?
I made all the fields and such, but I'm unsure on how to send the info. |
|
#5
|
|||
|
|||
|
John said he'd be adding an API_ACCOUNT_USER soon, but right now I use:
PHP Code:
$server_ip the server's shared IP. *Note: This example uses the version 1.xx of this class; you need the wrapper to continue in this fashion*
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool Last edited by l0rdphi1; 11-22-2003 at 06:00 PM. |
|
#6
|
|||
|
|||
|
I edited my original post to include version 1.1 of the class.
I hadn't realized PHP's parse_str() function breaks when DA uses '&' characters in the returned string, and thus version 1.1 fixes this. Additionally, I recently replied to this thread with the code I use to create DA accounts. Enjoy, Phi1.
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool Last edited by l0rdphi1; 09-15-2003 at 12:23 AM. |
|
#7
|
|||
|
|||
|
Hi,
Looks interesting, what can it do exactly? Is it just for the API commands? Cheers, Matt
|
|
#8
|
|||
|
|||
|
Yeah, it's a simple tool for using DA's API. You could use it for other socket connections too though.
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#9
|
|||
|
|||
|
Thanks
|
|
#10
|
||||
|
||||
|
I have one question, when this code is in actual working form, cant someone go "view source" and pull out your username and password for DA Login?
__________________
B. Bryant Bryco PC Consulting and Internet Services P.O. Box 491, Mc Calla, AL 35111-0491 http://www.BrycoPc.com/ |
|
#11
|
|||
|
|||
|
Not that I'm aware of. Even if view-source worked for me, shouldn't it only display the HTML source, and not any of the PHP?
And incase you fear someone actually getting the PHP source: you could always encrypt the password making it at least a little harder to figure out. Phi1.
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#12
|
|||
|
|||
|
I just updated to 1.2 to fix some problems with url encoded arrays.
Enjoy
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#13
|
|||
|
|||
|
How about having visitors create mailboxes?
How do you implement this in the class? <form action=/CMD_EMAIL_POP method=POST> action=create domain=domain.com user=emailname (do not include @domain.com) passwd=password passwd2=password create=Create ??? |
|
#14
|
|||
|
|||
|
You won't need a class if you're going to send it via a form, but then again, I'm not sure that will even work. Try it, if you please.
I can modify the class to support POST, but I won't get time enough for that until this weekend. Phi1.
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#15
|
|||
|
|||
|
Just post the form to your own PHP script, which in turn parses the form and uses the DA communicating class to send the info on to DA
![]() Matt |
|
#16
|
|||
|
|||
|
The problem as I take it is that DA's CMD_EMAIL_POP API doesn't take GET data. As I said though, I can add support for POST this weekend
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#17
|
||||
|
||||
|
this needs a little *bump* or a little bit of a sticky?
|
|
#18
|
|||
|
|||
|
I'm currently in the process of rewriting this by the way. Will support both GET and POST, and fix a bug in the array_last_parsed method.
Feel free to sicky, if you like
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#19
|
|||
|
|||
|
Thanks for the sticky
We should see v2.0 today. Yay.
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool |
|
#20
|
|||
|
|||
|
Okay, 2.0 is up. There have been a lot of changes.
I put together a wrapper for old versions, so you don't have to recode anything. Check that out here. Enjoy
__________________
Installatron Applications Installer gives you and your users an intuitive interface to install, upgrade, and backup/restore a growing collection of web apps. It's a native DirectAdmin plugin and is absolutely FREE for one domain! Also: cPanel-to-DA converter ∙ Bulk Domains and Sub-domain Plugin ∙ DA User Tool Last edited by l0rdphi1; 01-22-2004 at 01:14 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Discussion about CustomBuild | jlasman | CustomBuild | 898 | 07-13-2010 10:56 AM |
| PHP suexec on DA server! | Tarak | DirectAdmin General Discussion | 2 | 09-25-2009 09:20 AM |
| PHP 4 and PHP 5 (.htaccess) | ATN Networks | MySQL / PHP | 3 | 01-26-2009 08:08 AM |
| php not found | pucky | General Technical Discussion & Troubleshooting | 2 | 09-28-2006 08:26 AM |
| How to install php on my DA panel? | new new | How-To Guides | 1 | 09-14-2006 03:23 PM |