Changeset 157 for trunk

Show
Ignore:
Timestamp:
09/15/08 10:02:34 (4 months ago)
Author:
root
Message:

some bugs fixed

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/main.php

    r155 r157  
    356356                        } elseif (preg_match("/^(?:.*)compatible;\sMSIE\s([0-9\.]+)/",$useragent,$match)) { 
    357357                                $browser = "IE"; 
     358                        } elseif (preg_match("/^Mozilla(?:.*)(?:.*)Chrome/",$useragent,$match)) { 
     359                                $browser = "Google Chrome"; 
    358360                        } elseif (preg_match("/^Mozilla(?:.*)(?:.*)Safari/",$useragent,$match)) { 
    359361                                $browser = "Safari"; 
     
    645647                   // Start getting GEOIP info 
    646648                   $geo_url = "http://api.hostip.info/get_html.php?ip=".$ip[0]."&position=true"; 
    647                    $data = file($geo_url); 
     649                   $ci = curl_init(); 
     650 
     651                   curl_setopt($ci, CURLOPT_URL, $geo_url); 
     652                   curl_setopt($ci, CURLOPT_HEADER,0); 
     653                   curl_setopt($ci, CURLOPT_USERAGENT, $_SERVER[HTTP_USER_AGENT]); 
     654                   curl_setopt($ci, CURLOPT_FOLLOWLOCATION, 1); 
     655                   curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1); 
     656 
     657                   $data = curl_exec($ci); 
     658                   curl_close($ci); 
     659 
     660                   $data = explode("\n",$data); 
     661                    
    648662                   if (eregi("unknown", $data[0])) { 
    649663                           $loc_country = eregi_replace("country: ", "", $data[0]); 
     
    656670                                $gkey = $wassup_settings['wassup_googlemaps_key']; 
    657671                                   if ($geoloc != "") { 
    658                                            $geocode = geocode($geoloc, $gkey); 
     672                                           $geocode = geocodeWassUp($geoloc, $gkey); 
    659673                                                if($geocode[0] != 200) { 
    660674                                                        $lat = explode(":", $data[2]); 
     
    734748 
    735749// Geocoding location with Google Maps 
    736 function geocode($location, $key) { 
     750function geocodeWassUp($location, $key) { 
    737751        //Three parts to the querystring: q is address, output is the format ( 
    738752        $address = urlencode($location); 
  • trunk/lib/settings.php

    r154 r157  
    9595                <?php // Test Google Maps Key If the test fails deactivate *map options  
    9696                if ($wassup_options->wassup_geoip_map == 1) { 
    97                         $code = geocode("Ancona", $wassup_options->wassup_googlemaps_key); 
     97                        $code = geocodeWassUp("Ancona", $wassup_options->wassup_googlemaps_key); 
    9898                                if ($code[0] != "200") {  
    9999                                        $code_error = "<script type=\"text/javascript\">jQuery(document).ready(function($){ $(\"#key_error\").fadeIn(2000); });</script><p id='key_error' style='text-align:center;background:#FA8C97;border:1px solid #999;padding:4px;margin:4px;width:40%;display:none;'>--->> <strong>WARNING</strong> Activation problem >> Error code: <a href='http://code.google.com/apis/maps/documentation/reference.html#GGeoStatusCode' target='_BLANK'>".$code."</a> <<---</p>"; 
  • trunk/readme.txt

    r156 r157  
    55Requires at least: 2.2 
    66Tested up to: 2.5.* - 2.3.2 - 2.3.1 - 2.3 - 2.2 
    7 Stable tag: 1.6.2 
     7Stable tag: 1.6.3 
    88 
    99Analyze your visitors traffic with real time statistics, chart, a lot of chronological information and a sidebar Widget. 
  • trunk/wassup.php

    r154 r157  
    44Plugin URI: http://www.wpwp.org 
    55Description: Wordpress plugin to analyze your visitors traffic with real time stats, chart and a lot of chronological informations. It has sidebar Widget support to show current online visitors and other statistics. 
    6 Version: 1.6.2 
     6Version: 1.6.3 
    77Author: Michele Marcucci, Helene D. 
    88Author URI: http://www.michelem.org/