Closed funkyfela closed 8 years ago
See issue #64, I assume that's the issue you are getting. If so, either wait for that to be fixed, or host your own textbelt (server).
Textbelt should just work in any app that can make HTTP requests, so it should naturally just work in plain old PHP (with curl). But of course, I don't think anyone wrote sample code for textbelt in PHP, so you have to write your own if you were just looking for copy & paste code.
And if you don't run into any cross domain access issues, it should also work in just plain AJAX javascript client side code without any (PHP) server side code. If you hit that issue, there are several solutions, including use of (PHP) server side code or hosting your own textbelt to be on same domain as your (client side) app.
On a related note, here are some code samples if you need any:
Use of PHP to help send SMS using a similar free AutoSMS API (you can always adapt it for textbelt): http://www.watacrackaz.com/autosms/apiexample.zip
You can find pure client side AJAX implementations (without need of PHP) here:
https://gist.github.com/bryanjimenez/3ad2868d0e54142b7725
and any of the clients under https://github.com/daluu/textbelt-clients (although these work as extensions/apps so they don't have cross domain issues like a regular web page/app)
I see now from looking at your profile that you were exploring the available PHP clients to TextBelt service. I would discuss the issue with the developers of those clients, as your issue then is not directly related to TextBelt.
Well, like you I got annoyed that the available PHP clients, while nicely wrapped with features, require extra framework/tooling setup. So if this suits your needs, here's a more barebones demo/solution that only needs curl support in PHP:
Maintainer of Courier here.
Just added unit testing, guzzle and canadian/international support. It's a very simple client and I aim to keep it that way but still improving it from time to time.
thanks dylan :)
How can this be used in a php application. i tried courier but to no avail or maybe i am doing something wrong.
phpsms requires composer which i dont want to go into for now. what is the basic require/include to use it with a php app.
thanks