eugenevdm Posted April 30, 2007 Share Posted April 30, 2007 I having someone design an import routine for Plesk Clients & Domains. Instead of reverse engineering the database and interacting directly with it, is it possible to view the import scripts, such as the Modernbill import script, in clear text? At present it looks all garbled (Ioncubed?) and I'm sure it's probably intellectual property, but being able to see an example import script will save my developer quite a bit of time. It looks like an import will involve first creating a client, then an order, and then a product / domain. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 30, 2007 Share Posted April 30, 2007 I wouldn't bet on it. An import script is made up of a ton of MySQL entries. Query...Import.. Update... It's not very complicated IMO, just time consuming. Your developer should know/understand that. Just looking at another import script would only give an idea of how to structure it. The real work is looking back and forth at database tables matching things up. 0 Quote Link to comment Share on other sites More sharing options...
eugenevdm Posted April 30, 2007 Author Share Posted April 30, 2007 Right but an existing script could give me some ideas on how the order numbers are generated and how the passwords are encrypted.. 0 Quote Link to comment Share on other sites More sharing options...
skshost Posted April 30, 2007 Share Posted April 30, 2007 In most cases passwords are best encrypted using md5() with added salt. Can you be specific on the Import script you're looking for?.. Import from _____ to _____? 0 Quote Link to comment Share on other sites More sharing options...
eugenevdm Posted May 1, 2007 Author Share Posted May 1, 2007 I would like to import from Plesk 8.1.x Windows & Linux Clients and Domains to WHMCS 3.1.2. Plesk Linux keeps it's clients in a table called 'clients'. WHMCS keeps it's clients in a table called 'tblclients' These fields correspond as follow: Plesk Linux <-> WHMCS ------------ ----- id <-> id (auto increment) cname <-> companyname pname <-> firstname + lastname login <-> in WHMCS your email is your login account_id <-> no equivalent but needs to be used to extract clear text password from Plesk phone <-> phonenumber fax <-> does not exist, possible to add in custom fields (more later) email <-> email address <-> address1 + address2 city <-> city state <-> state pcode <-> postcode country <-> country Linked to 'accounts' <-> password (encrypted) If you've added custom fields such as 'Fax' you have to examine 'tblcustomfields' and to obtain the relative IDs to the 'tblcustomfieldsvalues' and so obtain the values. At this stage I'll leave that to the brave. Plesk for Windows has a slightly different layout, in that the password field isn't related to a different table, instead held in the 'clients' table in a field called 'passwd'. When you talk about domains it gets more interesting. Plesk domains are held in a table called 'domains' and linked to the 'clients' table by the 'cl_id' field. Plesk domain limits are held in a table called 'Limits' and linked in the 'domains' table by the 'limits_id' field. The reason why I mention limits is because at some stage during this conversion process I have to add new packages ('tblproducts') to WHMCS but before I can do that I have to hard code our Hosting packages to some of the existing limits as defined by Plesk. To give you an example, if the 'disk_space' limit is '209715200' and I'm currently migrating server 'Server29' I have assume it's a Silver Hosting package that normally comes with 200 MB disk space. Silver hosting packages must be hard coded to the correct ID in 'tblproducts'. This will work quite well on our system because on specific servers specific packages normally have set amounts of disk space. Where this won't work is when the web site was set up on Plesk without a template, or where the Plesk limit has been increased. But I suspect this will migrate about 90% of the sites just fine. In order to migrate domains that don't have hosting I will look for a specific limits and instead of inserting into 'tblproducts' I have to insert into 'tbldomains'. Once I've determined which package to assign it looks like I have to create an order in WHMCS in the 'tblorders' table. My actual objective is to create a new Hosting entity in the 'tblhosting' table, but since 'tblhosting' refers to orders I am going to create an order first. This is where the order number ('ordernum') comes in, I haven't worked out how it's generated but it looks fairly random. At some stage I have to assign prices to hostings, this will also have to be some kind of a hard coded lookup. I'm not really a developer but this is the brief I gave to my developer to far. If anyone has some constructive input please feel free to comment. 0 Quote Link to comment Share on other sites More sharing options...
mediademon Posted July 3, 2008 Share Posted July 3, 2008 Hiya In a similar position (Plesk 8.3 on Windows) with a bunch of client accounts / domains to move to WHMCS. Did you actually finish a script to do this? Kind regards Mediademon 0 Quote Link to comment Share on other sites More sharing options...
mediademon Posted July 30, 2008 Share Posted July 30, 2008 Hi Doesn't matter, done it manually while waiting for a response... tfn 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.