I want to use a Php script to retrieve information from the .db file of a shapefile saved as a layer in Geoserver. I need to retrieve attribute data from the layer and present it at the client side.

Is this possible with the functionality provided by the geoserver?


3 Answers 3


yes it is very possible and called web feature service, you can make wfs requests to geoserver with curl library and pass that information to your client. data from geoserver is served as GML,JSON etc. you need to parse this information


Is this possible with the functionality provided by the geoserver?

If this is your specific question, no. Geoserver is a Java application, PHP is a language/server environment. They do not mix, in any way besides PHP, for instance, requesting things from Geoserver via REST or some OGC standard.

If your question is whether PHP can read attributes from shapefiles, the answer is a kind of, see its dbase support.


I can get some very basic results from WFS using curl in my PHP-webapplication.

So basically, it works for me. But be aware, that sending a request to WFS in the adress line of a browser is not the same as sending the very same request using PHP and curl.

You will have to try, the best results for me are simple getfeature - requests with CSV as output-format, filtering does not work for me...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.