且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用PHP通过Skype发送短信

更新时间:2023-02-21 22:28:18

如果您在Windows上运行PHP,则可以使用 PHP的COM包装器 Skype4COM 进行交互。我没有测试过,但是按照Skype4COM文档中的示例,这应该可行:

If you're running PHP on Windows, you can use the COM wrapper for PHP to interface with Skype4COM. I haven't tested it, but following the examples from the Skype4COM documentation, this should work:

$skype = new COM("Skype4COM.Skype");
$skype->sendSms("+1234567890", "SMS text goes here");

但是,这将使用服务器上运行的Skype实例。当然不可能使用客户端JavaScript与客户端计算机上运行的Skype实例进行交互。可以使用MSIE和VBScript进行一些基本的接口,但我认为这种方式的功能也非常有限,因为如果不受限制,它将是非常不安全的。

However, this would use the instance of Skype running on your server. It is certainly impossible to interface with the instance of Skype running on your client's machine using client-side JavaScript. Some basic interfacing can be done with MSIE and VBScript, but I think that this way the functionality would be very limited as well, because it would be very insecure if it wasn't limited.