此SO问题包含有关如何使用cPanel的信息自己使用XML API.如果由于某种原因而无法使XML API正常工作,则还有另一个脚本可以在此处对cPanel本身进行常规的HTTP调用: http://www.zubrag.com/scripts/cpanel -create-email-account.php I need to create an email account in PhP. I found a ton of code samples online that do this, however I have a few problems:I'm on a shared server host with the default php.ini, and my host won't change itI need to create it via a URL, not with forms (something like: mywebsite.com/email.php?username=user)The password and quota created needs to be the same every time, so the only thing after the ? I need is the usernameI have 0 experience with PhP so I can't just edit one I find online, so sorry if this is easy. If someone could point me in the direction of a script someone made or something that'd be great! Thanks. 解决方案 From your reply, it turns out that you are using cPanel. This is quite helpful, as cPanel provides its own XML API for some administrative tasks, including creating email accounts.You can find a ready made script that uses the cPanel XML API and does what you require in this forum post:http://forums.glowhost.com/programming-talk/using-cpanel-api-creating-email-account-forwarders-your-own-php-scripts-2798.htmlThis SO question contains information on how to use the cPanel XML API yourself.If for some reason you can't get the XML API to work, there's another script that makes regular HTTP calls to cPanel itself over here:http://www.zubrag.com/scripts/cpanel-create-email-account.php 这篇关于使用PhP创建电子邮件帐户-我需要解决一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-18 18:41