Skip to main content

#__hikashop_geolocation aucune info

More
14 years 5 months ago - 14 years 5 months ago #47825 by erickb
Bonjour

#__hikashop_geolocation ne retourne aucune info, la table reste vide sur les geolocation_country ect..
que faut il pour que ça marche ?

j'ai pourtant une cle de ipinfodb.com/register.php

merci
Last edit: 14 years 5 months ago by erickb.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #47944 by nicolas
Vous avez configuré et publié le plugin de géolocation ?
Vous avez essayé en changeant de session utilisateur ?

La table est complètement vide ? Ou seulement certaines colonnes ?

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #47965 by erickb
oui bien sur, j'ai mis la cle et c'est publie, il y a de toute facon peu d'options

je recuperes les lieux de commande avec une fonction à moi comme vu ici www.hikashop.com/fr/forum/5-support-en-f...stingphp-icones.html donc trouver le lieu n'est pas le probleme mais je prefererais utiliser le natif d'Hikashop




la table est remplie avec l'ip , order ect ... mais la localisation est vide
est ce que ce plugin depend d'un nom de domaine ?

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #47976 by nicolas
En fait, l'api de Geolocation a changé il y a un an et ne fournit plus les informations de localisation comme c'était le cas auparavant. Donc les colonnes qui contenaient autrefois des informations intéressantes ne sont maintenant plus utilisées et seul le minimum syndical est disponible malheureusement.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago - 14 years 5 months ago #47979 by erickb
en ce cas j'utilise ça
Code:
function geoLocationByIp($ip) { $domain = 'http://www.netip.de/search?query='; if(!filter_var($ip, FILTER_VALIDATE_IP)) { throw new InvalidArgumentException("IP ?"); } $response=@file_get_contents($domain.$ip); if (empty($response)) { throw new InvalidArgumentException("Erreur contact Geo-IP-Server"); } $patterns=array(); $patterns["domain"] = '#Domain: (.*?)&nbsp;#i'; $patterns["country"] = '#Country: (.*?)&nbsp;#i'; $patterns["state"] = '#State/Region: (.*?)<br#i'; $patterns["town"] = '#City: (.*?)<br#i'; $ipInfo=array(); //check response from ipserver for above patterns foreach ($patterns as $key => $pattern) { //store the result in array $ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found'; } // host, state, country, town $c = utf8_encode($ipInfo['country']); $t = utf8_encode($ipInfo['town']); $s = utf8_encode($ipInfo['state']); $c = str_replace('not found','?', $c); $t = str_replace('not found','?', $t); $s = str_replace('not found','?', $s); $loc = $c . ' : ' . $s . ' : ' . $t; return $loc ; }
Last edit: 14 years 5 months ago by erickb.

Please Log in or Create an account to join the conversation.

Time to create page: 0.239 seconds
Powered by Kunena Forum