#!/usr/bin/php -q
<?php
/**
* Anveo API script v1.0
*
* PHP Script for sending a text message to Anveo Communicator
*
* PHP versions 4 and 5 compiled with curl and https support
* LICENSE: FREE
*
* @author Anveo.com
*/
/**
* USAGE
* AnveoCommunicatorMessage(<nickname>,<message>)
*
*/
function AnveoCommunicatorMessage($nickanem,$message){
$apikey="- YOUR API KEY -"; //CHANGE ME
// need curl with https if using https://
$ch = curl_init ("https://www.anveo.com/apihttp.asp?apikey=".$apikey."&action=communicator.message&nickname".urlencode(nickname)."&message=".urlencode($message));
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result=curl_exec ($ch);
curl_close ($ch);
echo $result;
}
?>