Now with SMS ! New
or create new account
Anveo API - PHP Code Sample

The following PHP code sample uses PEAR PHP library to post Anveo API XML Message over HTTP.
//                  PHP implementation of Anveo API to initiate DIAL.CONNECT API Action
//   The rest of Anveo API functions can be implemented by simply changing XML stored in $data variable
//                                          2008 - Anveo team.
require_once "HTTP/Request.php";

// ANVEO API Variables
$url = "";
$data = '<?xml version="1.0" standalone="no" ?>
		<USERKEY>----------- YOUR API USERKEY -----------</USERKEY>
		<PARAMETER NAME="SSIGNATURE">'.hash_hmac('sha1', "", "my secure phrase").'</PARAMETER>
		<PARAMETER NAME="MEMO">DIAL.CONNECT API Action example to connect 1215215215 with 1212121212 delayed by 24 hours</PARAMETER>
$req =& new HTTP_Request($url);
$req->addHeader("Content-Type", "application/xml; charset=UTF-8");
$req->addHeader("Content-Length", strlen($data));
$req->addHeader("Accept", "application/xml; charset=UTF-8");
$req->addRawPostData($data, true);
if (PEAR::isError($response)) {
   // HTTP ERROR. Use $response->getMessage(); to get detailed error description

// $result holds API result in XML format
//echo $result;

News Blog About Anveo Terms of Use Privacy Policy FAQ Contact Us © 2024 Anveo Inc.