Developers Index |
API V2 PHP ClientTextMarks provides a PHP library to integrate with the V2 HTTP API. This allows your apps to easily make calls into the TextMarks API. There are also other easier (less technical) ways to send and receive text messages from and to your apps without using this API. Client LibrarySupport Files (required ONLY for PHP 5.1 or older)Download (JSON.php - ~34 KB) Example Code - Invite a user to join a TextMark group
<?php Example Code - Broadcast an alert to all users subscribed to a TextMark
<?php Example Code - Check a keyword's status/availability:
<?php Example Code Output:
*Response:
Array
(
[head] => Array
(
[rescode] => 0
[resmsg] => OK
[version] => 2.57a-BETA
)
[body] => Array
(
[available] => 1
[status] => available
[keyword] => MYKEYWORD
)
)
*Keyword status code: available
More Sample Code
Looking for more sample code? Check out the STATEINFO sample code, which shows how to build a simple server-side script to dynamically respond to users SMS requests. This STATEINFO script doesn't use the V2 HTTP API at all. But if you wanted to extend STATEINFO into a mini-game where each state had a "captain" who was alerted by SMS every time somebody queried their state, then you could easily add that in using the API. |