Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author luciole135

    (@luciole135)

    No, this information has been deleted because it is very inaccurate!

    The PHP function gethostbyaddr($ ip) which locates TLD is unfortunately not at all accurate and the data they are often false returns, which did not interest statistics. Also it works only ipv4 addresses (not with ipv6) and its use will soon be deprecated.

    However, if you care to have this information (very inaccurate), you must return to 1.4.3.

    Thread Starter thirdoff

    (@thirdoff)

    Thank you for your reply. I would like to compare the old table code to the new table code in hopes I can manually add the domain. COuld anyone point me to the right lines while I go look. Thank you.

    Plugin Author luciole135

    (@luciole135)

    You must see in the function luc_StatAppend() in the statpress.php file:

    1)Add in these function :
    $domain = strtoupper(luc_Domain($ipAddress));

    with function luc_Domain($ip)
    {
    $host = gethostbyaddr($ip);
    if (preg_match(‘#^([0-9]{1,3}\.){3}[0-9]{1,3}$#’, $host))
    return “”;
    else
    return my_substr(strrchr($host, “.”), 1);
    }
    2)add these line in the WordPress INSERT instruction of luc_StatAppend()
    ‘nation’ => mysql_real_escape_string(strip_tags($domain)), dont forgot to add a %s too.

    2)You must add in luc_StatPressV_CreateTable
    the line
    nation TINYTEXT,
    to deactive and active these plugin without the deletion of the column

    Simply compare the function of 1.4.3 and 1.5, you will see what you must add…

    Thread Starter thirdoff

    (@thirdoff)

    ty ty

    Plugin Author luciole135

    (@luciole135)

    I forgot to say too, you must delete these line :
    $wpdb->query(“ALTER TABLE $table_name DROP COLUMN nation”);
    in the function luc_StatPressV_CreateTable

    Thread Starter thirdoff

    (@thirdoff)

    I renamed the 1.5.X plugin folder and moved 1.4.3 back in its place. The domain column is back but it’s blank. I am in the process of manually adding the edits. Maybe we could add this back in as an option with notes on how its not accurate or preferred but still available for people like me.

    I see “nation” but just to clarify, it is “domain” that I am interested. I assume you understand and this is the variable that handles the “.com” being listed.

    Plugin Author luciole135

    (@luciole135)

    The Original statpress stored the language in the column “nation” because the designer made ??a mistake: he confounded the language and country. What is wrong the Americans speak English and are not English.

    So, “Statpress reloaded” stored the internet domain in the same column. I did not change that, I kept the name “nation” because I used personal “Reloaded”.

    I thought initially make an option but we must completely rewrite the code from Reloaded which is no longer valid.
    I will take a complete rewrite of the code to make it also available with ipv6 addresses.

    Meanwhile it is best to go back in 1.4.3 where you have an option in the “update” that allows to update Internet domains.

    But I would suggest doing this update on a site installed locally on your computer and not online because this update uses a lot of server resources.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: StatPress Visitors] [Plugin: Statpress Visitors] Where did the TLD listing go?’ is closed to new replies.