File: dataset.php

package info (click to toggle)
node-iscroll 5.2.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 676 kB
  • sloc: javascript: 2,062; makefile: 10; php: 8
file content (14 lines) | stat: -rw-r--r-- 393 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
//header('Cache-Control: no-cache, must-revalidate');
//header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');

$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
$count = isset($_GET['count']) ? min((int)$_GET['count'], 2000) : 100;

$data = array();
for ( $i = $start; $i < $start+$count; $i++ ) {
	$data[] = $i;
}

echo json_encode($data);