plugin doesnt work properly in usa and other countries

244 views
Skip to first unread message

Y S Gupta

unread,
Dec 16, 2013, 1:53:40 AM12/16/13
to geop...@googlegroups.com
Hi ..

firstly i would like to thank u for the awesome plugin

but i see some big issues with the script

prices are not showing in usa , singapore , south america and some other countries

http://nityahosting.com/

to check i used :

http://geopeeker.com/fetch/?url=http%3A%2F%2Fwww.nityahosting.com%2Findex.php

and one more issue is that when i access my website with www. it shows my ip as united states and is not displaying the prices

http://www.nityahosting.com/

i dont know what i did wrong here but there is a huge difference in www and with out www

pls kindly help i am loosing business :-(

Y S Gupta

unread,
Dec 16, 2013, 2:41:57 AM12/16/13
to geop...@googlegroups.com
Hi..

i have asked my host and he says

It is not properly set for US locations

[13-Dec-2013 18:29:38] PHP Notice: geoPlugin class Notice: currencyConverter has no value. in /home/nitya/public_html/geoplugin.class.php on line 121
[13-Dec-2013 18:29:38] PHP Notice: geoPlugin class Notice: currencyConverter has no value. in /home/nitya/public_html/geoplugin.class.php on line 121

are the errors he see :-(


Y S Gupta

unread,
Dec 16, 2013, 6:27:30 AM12/16/13
to geop...@googlegroups.com
Hi..

solved it my self

for base currency we should use if and else statement and define a new base currency

<?php
$geoPlugin_array = unserialize( file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $_SERVER['REMOTE_ADDR']) );
 
if ( $geoPlugin_array['geoplugin_currencyCode'] == 'USD' ) { //let's use a different base currency
 
    $geoPlugin_array = unserialize( file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $_SERVER['REMOTE_ADDR'] . '&base_currency=EUR') );
 
    echo ''.$geoPlugin_array['geoplugin_currencySymbol'] . round( (581.61 * $geoPlugin_array['geoplugin_currencyConverter']),0) . '';
 
} else {
 
    echo '' . $geoPlugin_array['geoplugin_currencySymbol'] . round( (800 * $geoPlugin_array['geoplugin_currencyConverter']),0) . '';
 
}
?>

cool its working now ...


On Monday, December 16, 2013 12:23:40 PM UTC+5:30, Y S Gupta wrote:
Reply all
Reply to author
Forward
0 new messages