<?php
	header('Cache-Control: no-cache, no-store, must-revalidate');   
	header('Expires: 0');
	header('Access-Control-Allow-Origin: *');
	set_time_limit(3600);
	ini_set('memory_limit','1024M');
	
// error_reporting(E_ALL);
// ini_set('display_errors', TRUE);
// ini_set('display_startup_errors', TRUE);

	date_default_timezone_set('Europe/London');

	$mHost = 'localhost'; // or this could be '127.0.0.1'
	$mUser = 'root'; // mysql user
	$mPwd = 'root'; // mysql password
	$mDbName = 'kuk'; // Whatever your database schema is
	
	$mConnection=mysqli_connect($mHost,$mUser,$mPwd,$mDbName) or
		exit("FAIL-Connect failed: ".mysqli_connect_errno()." : ". mysqli_connect_error());
	$mDataQuery = "SELECT * FROM part LIMIT 10";
	if (!$mData = mysqli_query($mConnection,$mDataQuery))
		exit ("FAIL-".mysqli_error($mConnection)."-".$mDataQuery);
	while($mRow = mysqli_fetch_assoc($mData)) 
	{
		echo (json_encode($mRow));		
	}

?>