Coder Social home page Coder Social logo

d4h / helper-library-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from worldtext/helper-library-php

0.0 2.0 0.0 112 KB

PHP Helper Library for World-Text.com SMS Text Messaging HTTP API

Home Page: http://www.world-text.com

License: Other

PHP 100.00%

helper-library-php's Introduction

World-Text-PHP

PHP Helper Library for World Text SMS Text Messaging

Installation

You can install World-Text-PHP by downloading the source.

Once you have downloaded the library, put the World-Text-PHP folder into your project hierarchy and then include the library file:

require_once('/path/World-Text-PHP/WorldText.php');

[Click here to download a ZIP of the source] (https://github.com/m-r-h/World-Text-PHP/zipball/master) which includes all dependencies.

API Documentation

World Text SMS API is documented here: World Text HTTP REST API

PHP Helper Library Documentation is here: World Text PHP Helper Class

Introduction

With the World-Text-PHP library, we've encapsulated our API into a number of objects. You don't need to be directly concerned with the API calls, or URLs, or parsing the JSON responses.

The classes are as follows:

  • WorldText - The base class, containing the API calls and response processing
  • WorldTextAdmin - container for admin methods
  • WorldTextSms - Derived from WorldText and the container for sms methods
  • WorldTextGroup - Derived from WorldText and the container for group methods. Pre-populated with a group from your account on our servers and minimises calls to the API in the process.
  • wtException - adds a couple of methods for additional codes to the Exception class

See the World Text PHP Class Guide to get the details on the classes and methods, and how to get started with World-Text-PHP

Quick Intro

Send an SMS Text Message

<?php
require_once('/path/World-Text-PHP/WorldText.php');

// Replace id and apiKey with values from http://www.world-text.com/account/
// ...and the mobile number with a valid one in international format

$id = "XXXXXX";     // Your Account ID
$apiKey = "XXXXXX"; // Your secret API Key

$sms = WorldTextSms::CreateSmsInstance(id, apiKey);

try {
    $info = $sms->send("447989000000", "Example message");
} catch (wtException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
}

?>

Documentation

Full Documentation for World-Text-PHP is on our site, along with detailed API documentation and other libraries and languages.

Prerequisites

  • PHP >= 5.2.3

Feedback, Ideas and Issues

We would love to hear your ideas and feedback, or if you've added to, or modified this library. Report issues using Github Issue Tracker or email [email protected].

helper-library-php's People

Contributors

m-r-h avatar

Watchers

James Cloos avatar David Synnott avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.