Sample PHP app that demonstrates vLine API integration.
-
Sign up for a vLine developer account and create your vLine service.
-
Make note of your
API Secreton theService Settingstab in the vLine Developer Console. -
Make sure you have MySQL installed and running on your computer.
-
If your installation did not set a password for the root user (e.g., Homebrew on OSX), you can set it with:
mysqladmin -u root password mynewpassword -
If using the default PHP installation on OSX, you may need to copy
/etc/php.ini.defaultto/etc/php.iniand setmysqli.default_socketto/tmp/mysql.sock:sudo cp /etc/php.ini.default /etc/php.ini sudo vim /etc/php.ini # Find "mysqli.default_socket" and set it to: mysqli.default_socket = /tmp/mysql.sock
-
-
Clone this repository.
-
Add your
Service IDandAPI Secretto thevline-php-example/classes/Vline.phpfile. -
Run the
server.shscript to automatically start Apache. (If you prefer, you can use any other webserver to serve up thevline-php-exampledirectory.) -
In your browser go to http://localhost:8080 and follow the application installation steps.
-
In your browser, go to http://localhost:8080/admin/
-
Add at least one additional user.
-
Open http://localhost:8080 in one regular browser window and one incognito window.
-
Log in as different users in the two windows.
-
Click on a username to call that user.