<?php /* Copyright (C) 2010, 2011 Instantor AB (SE), <http://www.instantor.com/> */ /* In order to use the InstantorRequest class, the following requirements must be met: php mcrypt extension must be loaded, PEAR modules Net_URL2 and HTTP_Request2 must be installed To install the pear modules, use the following syntax: > pear install HTTP_Request2-2.0.0RC1 > pear install Net_URL2-0.3.1 */ require "InstantorRequest.php"; $url = 'https://www.instantor.com/api'; $source = 'test_source'; $api_key = 'test_API_key'; $msg_id = rand(); $action = 'test/echo'; $payload = '<payload> Example <code>XML</code> </payload>'; $r = InstantorRequest::sendPostRequest($url, $source, $api_key, $msg_id, $action, $payload); var_dump($r); exit(0);
<?php /* Copyright (C) 2010, 2011 Instantor AB (SE), <http://www.instantor.com/> */ /* In order to use the InstantorRequest class, the following requirements must be met: php mcrypt extension must be loaded, PEAR modules Net_URL2 and HTTP_Request2 must be installed To install the pear modules, use the following syntax: > pear install HTTP_Request2-2.0.0RC1 > pear install Net_URL2-0.3.1 */ require "InstantorRequest.php"; $source = ''; // Enter your source name $api_key = ''; // Enter your API key $r = InstantorRequest::receivePostRequest($source, $api_key, $payload); echo $r; exit(0);