added server side code in php for creating json files v2

PHP server side code is added. Readme file is updated. Other small
improvements. Create constant.php to work with the application's server
side code