RSS

How to send Skype IM programmatically

30 Dec

SKYPE

In this tutorial, we ‘ll see how to send a IM to your Skype friends. For this, you need to access Skype API. There ‘s an Skype ActiveX component which allows to access their API. This is an object oriented layer which wraps the API functinality.

First you need to download the Skype4COM
component. Then You need to create an instance of type COM by specifying the path to above dll.

<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);

$skype = new COM('Skype4COM.Skype');

if (!$skype->client()->isRunning()) {
$skype->client()->start(true, true);
}
$skype->attach(5,false);

$members = new COM('Skype4COM.UserCollection');
$members->Add($skype->User('echo123'));

$chat = $skype->CreateChatMultiple($members);
$chat->OpenWindow();
$chat->SendMessage("Hi friend");
?>
Advertisements
 
Leave a comment

Posted by on December 30, 2012 in PHP

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: