PDA

View Full Version : Flynax Geodecode/Zip-Webservice trouble



Juergen Mainka
May 4, 2013, 05:55 PM
Hello Flynax team,

I recognized, that the "search by distance"-plugin doesn't work any more if you build the zip code field into a search form.
The routines and hooks works fine, but the in function modifySqlSelect there is a little bit trouble:


$code = $country_key ? $this -> county_iso[$country_key] : $config['sbd_default_country'];
$content_url = str_replace(array('{zip}', '{code}'), array(urldecode($zip), strtolower($code)), $this -> servers[0]);
$content = $reefless -> getPageContent($content_url);
$reefless -> loadClass('Json');
$content = $GLOBALS['rlJson'] -> decode($content);


The variable $content gets "null". The problem seems the function "getPageContent".

Any help?

Thx

Mike
May 7, 2013, 10:28 AM
Compare your "getPageContent" function it should be like in the attached file, or just replace.

It's likely to fix the problem

Juergen Mainka
May 7, 2013, 11:58 AM
Thank you Mike,

but this doesn't work.

It seems that the webservice called from the "search by distance" respond a "null"-value.
This is your webservice called:

http://SOMEWHERE_FROM_FLYNAX/~flgeocod/geocode.php?domain&license&country={code}&postal_code={zip}
(I hide the ip here)

My country is "de", zip code is a german one (58095). The placeholders and the url are correctly set by the plugin.

If I call the service entered "manually" in a browser-window I get a valid JSON-response.

How ever, I build a similar geocoding-service hosted on my machine, and that works now. But maybe other costumers will get same problem.


Regards
Juergen

Mike
May 8, 2013, 03:42 AM
Yes there were some problems on server, we have resolved it. Function i provided is correct.

Sorry for inconveniences and Thank you for participation =)

Juergen Mainka
May 9, 2013, 08:47 AM
No problem :cool: