使用 PHP 通过 Skype 发送短信

发布于 2024-08-03 00:45:01 字数 389 浏览 5 评论 0原文

有谁有使用 PHP 通过 skype 发送 sms 的经验吗?

我希望网站外的用户使用一个表单,并让他们选择是否要发送短信短信进行请求。首先,它必须检查客户端计算机上 Skype 的可用性,如果是,则应发送一条短信。当用户登录网站时,我已经在数据库中找到了用户的手机号码。

也许,我必须使用 Javascript 和 PHP 的组合?

我看到 Skype 有一个 call.php 脚本,但我似乎无法理解它应该如何使用。以及如何调整它来发送短信。

如果有人能给我一些指示,那将会很有帮助。

如果 Skype 将被关闭,那么有人知道在网站上实施的良好短信服务可以让我实现相同的目标吗?

Does anyone have any experience using PHP to send an sms via skype

I want the user off the website to use one the forms and give them a choice if they want to send an SMS to do a request. First it will have to check for the availabillity of Skype on the clients computer, if so it should send an SMS. I already have the users mobile number in the database when he logs to the website.

Maybe, I have to use a combination off Javascript and PHP?

I see that Skype has a call.php script, but I can't seem to understand how it is supposed to be used. And also how to ajust it to send sms messages.

If anyone can give me some pointers, that would be helpfull.

If Skype is to closed off then does anyone know a good sms service to implement on the website that would allow me to achieve the same goal?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不打扰别人 2024-08-10 00:45:01

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

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

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

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");

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.

唱一曲作罢 2024-08-10 00:45:01

不,php 是一种服务器端脚本语言,您无法用它访问客户端的电脑。我怀疑是否可以从 javascript 调用 Skype ...

no, php is a server side scripting language, you cannot access your clients’ pcs with it. and i doubt it is possible to call skype from javascript …

锦上情书 2024-08-10 00:45:01

正确..但是,这将使用在您的服务器上运行的 Skype 实例。

不正确..使用客户端 JavaScript 与在客户端计算机上运行的 Skype 实例进行交互当然是不可能的

^ 客户端 javascript 可以通过 javascript ajax 进行服务器调用,你甚至可以在不使用 javascript 的情况下进行服务器端调用将调用嵌入图像标签中!

IE。 img src="myskype_server.com/announcestatus.php?session=23eedwrwe23323&status=查看抵押文档"

announcestatus.php
// 连接到实际运行 Skype 的服务器
//进行一系列的安全检查
// 连接到运行 skype 的实际 Windows 电脑(可以使用 www.dyndns.com 等服务来修复其主机名)
//

如果有人特别感兴趣,我可以将用于实现此功能的不稳定代码打包并发布。

TRUE..However, this would use the instance of Skype running on your server.

NOT TRUE..It is certainly impossible to interface with the instance of Skype running on your client's machine using client-side JavaScript

^ The client side javascript CAN make server calls via javascript ajax, hell you can even make server side calls WITHOUT using javascript by embedding the call in an image tag!

ie. img src="myskype_server.com/announcestatus.php?session=23eedwrwe23323&status=viewing mortgage documents"

announcestatus.php
// connect to server actually running skype
//do a series of security checks
// connect to the actual windows pc running skype (It's host name can be fixed by using a service like www.dyndns.com)
//

If anybody is particularly interested, I can package up the wobbly code I used to implement this and post it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文