How to look for geocodes in Germany only? (PLZ or Postleitzahl)

Not sure whether I am in the right forum, so I apologize if this is not the
place to post!

I would like to switch from US "zip" codes to PLZ (Postleitzahlen) in
Germany. If I enter a German "zip" or "PLZ" code into the code below (for
$zip), the system is looking everywhere in the world ... including Germany.
What would be the proper code to only search within Germany?

Here is what works for the US:

    protected function getlatlonforzip($zip) 
    { 
            $url = 

"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placefinder%20where%20text%3D"".$zip.""&format=json";
$o = json_decode(file_get_contents($url));
$x = $o->query->results->Result;
return array($x->latitude, $x->longitude);
}

Thank you very much!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6d08aabe-1cb5-4ff1-9e02-8d26eace2d03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

This is completely off-topic, but I allow myself to answer.

Use Google Geocoding API, example:

http://maps.googleapis.com/maps/api/geocode/json?address=50674&region=de

Jörg

On Sat, Sep 13, 2014 at 7:58 PM, Jahn animoduro@gmail.com wrote:

Not sure whether I am in the right forum, so I apologize if this is not
the place to post!

I would like to switch from US "zip" codes to PLZ (Postleitzahlen) in
Germany. If I enter a German "zip" or "PLZ" code into the code below (for
$zip), the system is looking everywhere in the world ... including Germany.
What would be the proper code to only search within Germany?

Here is what works for the US:

    protected function getlatlonforzip($zip)
    {
            $url = "

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placefinder%20where%20text%3D"
".$zip."%22&format=json";
$o = json_decode(file_get_contents($url));
$x = $o->query->results->Result;
return array($x->latitude, $x->longitude);
}

Thank you very much!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6d08aabe-1cb5-4ff1-9e02-8d26eace2d03%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6d08aabe-1cb5-4ff1-9e02-8d26eace2d03%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGXBT0twozNZ88XPoLaDzBjkCrgAcJOU%2Bqzr3N3GJ%2BB-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.