cvrajan,
What you are asking for is an API for JaamSim. This something we are working on, but it is too soon to give an estimate of when it will be available. In the meantime, you need to use the input file and format your inputs appropriately. Incidentally, if you only need to change a few inputs, you can load your model from two separate files - one that is constant and the other that you prepared using your PHP program.
I'm not sure what you mean by a JaamSim "controller". Do you mean one of the objects in JaamSim or the Simulation object that controls the simulation run?
Harry