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 Secret
on theService Settings
tab 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.default
to/etc/php.ini
and setmysqli.default_socket
to/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 ID
andAPI Secret
to thevline-php-example/classes/Vline.php
file. -
Run the
server.sh
script to automatically start Apache. (If you prefer, you can use any other webserver to serve up thevline-php-example
directory.) -
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.