Javascript – Send an SMS via Skype with PHP

javascriptPHPskypesmssms-gateway

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?

Best Answer

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.