After we had a list of names and emails the next step was to write a PHP program that would take the emails and put them into an email group in WHMCS. This was also challenging since neither Taylor nor I had lots of experience with PHP. Our goal was to use the terminal on the Knight Domains control panel to:
- run a script that would connect to WHMCS
- Reference each line on the “emails.txt” file holding the alumni emails
- Find the corresponding client ID number for each email address
- Call the API and update a client’s/alumni’s assigned email group
Thankfully, WHMCS had some documentation to get us started. We were able to modify the given example code below to access both Knight Domains and WHMCS information.