Use RouteXL to obtain by PHP the optimization by text reply
We have an API fo programmatic access:
Here is some sample PHP code:
The API is free for routes with up to 10 stops. Upgrade your account for more stops per route. Addresses should be coordinates, so you’ll need to geocode to coordinates yourself. There are several services on the web for that.