Skip to content

Instantly share code, notes, and snippets.

View jsonp-callback-example.php
<?php
header('Content-Type: application/json');
$callback = isset($_GET['callback']) ? $_GET['callback'] : false;
$output = array(
'some' => 'data'
);
$output = json_encode($output);
You can’t perform that action at this time.