Add tokens to build file and in php

Refactor the build file to read tokens from
file and replace the tokens in the php code

issue #1