PHP code example of kbrabrand / silex-jsonp
1. Go to this page and download the library: Download kbrabrand/silex-jsonp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kbrabrand / silex-jsonp example snippets
use KBrabrand\Silex\Provider\JSONPServiceProvider;
$app->register(new JSONPServiceProvider(), array(
'JSONP.callback' => 'cb', // GET parameter containing the callback method name (optional)
'JSONP.contentTypes' => ['application/json'], // List of response content types to use with JSONP (optional)
));