We have provided many PHP sample code in the past, with the most recent being the call forwarding app.
Many developers have webhost providers that support PHP, but we have encountered many developers who wanted to get started with the PHP sample code quickly, yet they don’t have a webhost.
Fortunately, there is always a FREE and GOOD option around – Heroku!
While Heroku does not directly state that they support PHP, they do! This is how you can get started.
1. Register a Heroku account
2. Install the toolbelt
3. Create a project directory e.g. /hoiio-heroku-app
4. Create index.php in the root directory. It can be an empty file, but it MUST be there for Heroku to recognize this as a PHP app.
5. Init git and push. Issue these commands in root directory.
heroku create git init git add . git commit -m "Initial commit" git push heroku master
6. After pushing to heroku, you will see the URL to your app eg. http://intense-woodlands-1234.herokuapp.com.
7. Use any of Hoiio sample code, for example you can set up auto-attendant to create a Main Line. IMPORTANT: Read the setup instructions for auto-attendant. Your server URL is that you obtained in (6).
8. git push the code again
git add . git commit -m "Added Hoiio auto-attendant" git push heroku master
That’s it! Call your Hoiio number and test out!
Categories: API for Developers