bhoffman 0 Posted August 4, 2019 Report Share Posted August 4, 2019 (edited) Hi All Hoping someone can help with some advise. I am stuck on one of the bots I am currently creating where I have a csv file of domains and another of servers. The domain list represents any domains I have recently purchased and I want the bot to loop through the server and domain list to add the server details into a new column of the domain table. For example Domain listDomain1.comDomain2.comDomain3.comDomain4.com Server List Server1 | IP Address | UserName | PasswordServer2 | IP Address | UserName | Password I would like to add them in the domain table like below Domain1.com | Server1 | IP Address | UserName | PasswordDomain2.com | Sever2 | IP Address | UserName | PasswordDomain3.com | Server1 | IP Address | UserName | PasswordDomain4.com | Sever2 | IP Address | UserName | PasswordDomain5.com | Server1 | IP Address | UserName | PasswordDomain6.com | Sever2 | IP Address | UserName | Password Note the list of domains will be a lot larger than this and the server list also larger, but the main point is that I would like the smaller server list to loop through until the domain list has been populated. Below is what i have attempted but cannot get my head around this part, any help or advise would be appreciated clear table(&domains)clear table(&servers)ui open file("Select your file with your server details",#serverDetails)ui open file("Select the file with your domains",#domainList)create table from file(#serverDetails,&servers)create table from file(#domainList,&domains)set(#domRow,0,"Global")set(#serverRow,0,"Global")loop($table total rows(&domains)) { loop($table total rows(&servers)) { set table cell(&domains,#domRow,1,$table cell(&servers,#serverRow,0)) set table cell(&domains,#domRow,2,$table cell(&servers,#serverRow,1)) set table cell(&domains,#domRow,3,$table cell(&servers,#serverRow,2)) }increment(#serverRow) increment(#domRow)} Edited August 5, 2019 by bhoffman Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted August 5, 2019 Report Share Posted August 5, 2019 How do you know which server goes to which domain? Quote Link to post Share on other sites
bhoffman 0 Posted August 5, 2019 Author Report Share Posted August 5, 2019 HI Nick, These are for new domains and basically want to round robin my servers against any new domains I purchase, my project is much larger than this the ultimate goal is to, CloudFlare setup, DNS NS configuration with my registrar along with site creation in CPanel. RegardsBen Quote Link to post Share on other sites
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.