Information about the Third party REST interface can be found at:
http://tag.ws.suddenelfilio.netCreate a URI Tag with Microsoft Tag PHP library<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/URITag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new URITag();
$tag->MedFiUrl = 'http://www.google.be';
$tag->Title = 'Google Belgium';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->CreateURITag($tag,'Main');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Create a FreeText Tag with Microsoft Tag PHP library<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/FreeTextTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new FreeTextTag();
$tag->FreeText = 'http://www.google.be';
$tag->Password = 'LetMeSeeIt';
$tag->Title = 'Google Belgium';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->CreateFreeTextTag($tag,'Main');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Create a Dialer Tag with Microsoft Tag PHP library<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/DialerTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new DialerTag();
$tag->PhoneNumber = '<PHONENUMBER>';
$tag->Title = 'Call me';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->CreateDialerTag($tag,'Main');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Create a VCard Tag with Microsoft Tag PHP library<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/VCardTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new VCardTag();
$tag->City = 'city';
$tag->Company = 'company';
$tag->Country = 'country';
$tag->Email = 'info@email.com';
$tag->Firstname = 'firstname';
$tag->Lastname = 'lastname';
$tag->MobilePhone = '<PHONENUMBER>';
$tag->State = 'state';
$tag->Street = 'street';
$tag->Webpage = 'webpage';
$tag->WorkPhone = '<PHONENUMBER>';
$tag->Zip = 'zip';
$tag->Title = 'My vcard';
$tag->Password = 'ShowCard';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->CreateVCardTag($tag,'Main');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Generate a barcode in jpeg with Microsoft Tag PHP libraryPossible ImageTypes values are:
- pdf
- wmf
- jpeg
- png
- gif
- tiff
Possible Decoration types are:
- HCCBRPDECORATIONNONE
- HCCBRPDECORATIONDOWNLOAD
- HCCBENCODEFLAG_STYLIZED
- HCCBRPDECORATIONFRAMEPLAIN
<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$result=$proxy->GenerateBarcode('Main','<TAGNAME>','jpeg','0.75','HCCBRP_DECORATION_DOWNLOAD','false');
header("Content-type: image/jpeg");
echo base64_decode($result);
?>
Create a new category with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/Category.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$category = new Category();
$category->Name = 'TestCategory';
$category->UTCStartDate = gmdate("m/d/Y H:i:s");
$result = $proxy->CreateCategory($category);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Edit a category with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/Category.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$originalCategoryName = 'TestCategory';
$category = new Category();
$category->Name = 'TestCategory2';
$category->UTCStartDate = gmdate("m/d/Y H:i:s");
$result = $proxy->EditCategory($originalCategoryName, $category);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Pause a category with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$CategoryName = 'TestCategory2';
$result = $proxy->PauseCategory($CategoryName);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Activate a category with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$CategoryName = 'TestCategory2';
$result = $proxy->ActivateCategory($CategoryName);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Pause a tag with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$TagName = '<TAGNAME>';
$CategoryName = 'Main';
$result = $proxy->PauseTag($CategoryName,$TagName);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Pause a tag with Microsoft Tag PHP library (release 0.6)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$proxy = new MSTag($credentials);
$TagName = '<TAGNAME>';
$CategoryName = 'Main';
$result = $proxy->ActivateTag($CategoryName,$TagName);
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Edit a URITag with Microsoft Tag PHP library (release 0.7)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/URITag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new URITag();
$tag->MedFiUrl = 'http://www.google.be';
$tag->Title = 'Google BE';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->EditFreeTextTag($tag,'Main', 'Google Belgium');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Edit a FreeText Tag with Microsoft Tag PHP library (release 0.7)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/FreeTextTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new FreeTextTag();
$tag->FreeText = 'http://www.google.be';
$tag->Password = 'LetMeSeeIt';
$tag->Title = 'My test';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->EditFreeTextTag($tag,'Main', 'test');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Edit a Dialer Tag with Microsoft Tag PHP library (release 0.7)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/DialerTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new DialerTag();
$tag->PhoneNumber = '<PHONENUMBER>';
$tag->Title = 'My test';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->EditDialerTag($tag,'Main', 'test');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>
Edit a VcardTag with Microsoft Tag PHP library (release 0.7)<?php
require_once('lib/MSTag/MSTag.php');
require_once('lib/MSTag/UserCredential.php');
require_once('lib/MSTag/VcardTag.php');
$credentials = new UserCredential('<YOUR TAG API ACCESSTOKEN>');
$tag = new VCardTag();
$tag->City = 'city';
$tag->Company = 'company';
$tag->Country = 'country';
$tag->Email = 'info@email.com';
$tag->Firstname = 'firstname';
$tag->Lastname = 'lastname';
$tag->MobilePhone = '<PHONENUMBER>';
$tag->State = 'state';
$tag->Street = 'street';
$tag->Webpage = 'webpage';
$tag->WorkPhone = '<PHONENUMBER>';
$tag->Zip = 'zip';
$tag->Title = 'My new vcard';
$tag->Password = 'ShowCard';
$tag->UTCStartDate = gmdate("m/d/Y H:i:s");
$proxy = new MSTag($credentials);
$result=$proxy->EditVcardTag($tag,'Main', 'My vcard');
echo "Http code: $proxy->http_status<br/>";
echo $result;
?>