backhand / nexmo-php-lib Goto Github PK
View Code? Open in Web Editor NEWThis project forked from prawnsalad/nexmo-php-lib
Nexmo SMS gateway example library
This project forked from prawnsalad/nexmo-php-lib
Nexmo SMS gateway example library
Sending SMS via the Nexmo SMS gateway. Quick Examples -------------- 1) Sending an SMS $sms = new NexmoMessage('account_key', 'account_secret'); $sms->sendText( '+447234567890', 'MyApp', 'Hello world!' ); 2) Recieving SMS $sms = new NexmoMessage('account_key', 'account_secret'); if ($sms->inboundText()) { $sms->reply('You said: ' . $sms->text); } 3) Recieving a message receipt $receipt = new NexmoReceipt(); if ($receipt->exists()) { switch ($receipt->status) { case $receipt::STATUS_DELIVERED: // The message was delivered to the handset! break; case $receipt::STATUS_FAILED: case $receipt::STATUS_EXPIRED: // The message failed to be delivered break; } } 4) List purchased numbers on your account $account = new NexmoAccount('account_key', 'account_secret'); $numbers = $account->numbersList(); Most Frequent Issues -------------------- Sending a message returns false. This is usually due to your webserver unable to send a request to Nexmo. Make sure the following are met: 1) Either CURL is enabled for your PHP installation or the PHP option 'allow_url_fopen' is set to 1 (default). 2) You have no firewalls blocking access to rest.nexmo.com/sms/json on port 443. Your message appears to have been sent but you do not recieve it. Run the example.php file included. This will show any errors that are returned from Nexmo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.