Using Routing on Apache Web Server with PHP

Hey Forum,

I got another problem with my project.

For an explanation of what I have and what I want to do:
My Android Application is requesting a valid parking space (valid = some parameters like distance etc. hold true) from my Apache webserver. On the webserver, there is a CSV file saved that has all the parking spaces which I filtered out of an OSM file. On the request of the application, the PHP script is calculating the best parking space for the location and the parameters of the user (send with the android application). But currently, I am using the air distance and not the real distance which the car has to drive.

Instead, I want to use something like Dijkstra to get the real distance, but I am not sure how to do this on my PHP script. Is there a Routing Framework for PHP available or how should I handle this?

Hopefully, you guys can help me, because I am stuck on this.

Kind regards
Ecou

All known routing solutions that can handle OSM data should be listet

at https://wiki.openstreetmap.org/wiki/Routing in the OSM wiki, or its sub-pages.

I am not aware whether there is any PHP based framework.

Not a PHP framework per se, but you can use something like osm2pgrouting (or equivalent) to get a nodes and edges graph database into Postgresql. And PHP has plenty of routines for accessing Postgresql including the use of postgis stored database routines which can do the routing/distance calculations.

That said, I have had issues with osm2pgrouting with larger datasets, so getting the OSM road network into a nodes and edges routing database may best be done with some other program.