Code Monkey home page Code Monkey logo

goip-sms's Introduction

goip-sms

A php script to send SMS from a GOIP VOIP box, built on previous works.

This script is derived from the stackoverflow answer provided by paisapimp, and I take no credit for the original script beyond squashing some minor bugs and adding the ability to pass some things from the command line. See https://stackoverflow.com/questions/28941059/how-to-send-retrieve-sms-from-goip for the original Q&A

Dependencies of this script:

At least: php5-cgi php5 php5-curl php5-cli

If you have apache2 installed, this may satisfy some of these dependencies. The php5-cgi dependency may also be satisfied by php5-fpm.

How to use:

Change the IP address, username, and password to that of your GOIP box. If desired, the arguments retrieved from the command line may be changed to be static (telephone number and message) in the script.

Assuming you are using the command line: /path/to/php /path/to/sendsms.php telnumber 'Message'

Optionally, direct the output of this script to a location for further analysis.

Returned information:

This script will return the html code of the GOIP's webpage, followed by the http return code. 200 indicates that everything was accessed without issue, but not necessarily that the box was able to send anything properly.

Bugs squashed:

php complained about $fields_string being appended without being initialized. Initialized this value to ''

curl_getinfo complained about not having anything to return, CURLINFO_HTTP_CODE was chosen as it seemed the most useful.

goip-sms's People

Stargazers

hBytes avatar

Watchers

Mauricio Andrade 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.