fbpx

PHP 7 integration

Find out how to integrate JSQL with PHP 7 application

Stack requirements

The JSQL PHP 7 library will not work without an account in the JSQL cloud. To learn more see overview.

Installation

Download JSQL PHP 7 Library from our server

https://jsql.it/libs/jsql-php-1.0.0.zip

Then put whole files on your server using ex. FTP

Integration

The JSQL PHP 7 Library has very simple configuration. All you need to do is provide API_KEY and DEV_KEY.

The API_KEY and DEV_KEY we can get from JSQL Admin Panel, see FAQ for details.

You should store them in config/dev.ini file:

[KEYS]
Api-Key = "YOUR_API_KEY"
Dev-Key = "YOUR_DEV_KEY"

You also need to enable a2enmod rewrite to make routing works proper.

Usage

If you configure JSQL PHP 7 Library, you can start it and try to call the query using CURL:

curl 'https://localhost:8080/jsql/select' -H 'Accept: application/json' -H 'Content-Type: application/json' 
--data-binary '{"token":"318538af2934618047c92424b5df93b7df0c2b6ef0ef465f782b176d1c2968f8","params":{}}' --compressed

What next?

Close Menu