Extract text from a Website Stats Widget

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • virtualweb
    New Member
    • Aug 2007
    • 30

    #1

    Extract text from a Website Stats Widget

    Hello:

    I found a very nice Website Stats widget which I copy pasted into my site.

    What I like about this widget is that not only tells you which URL, country, date, time, IP, refrerrer, etc, (that most website counters display today), but a very cool additional piece of information I haven't found in any other webiste counter. It displays the city where the visitor comes from.

    You can see the widget here.

    Well.. feedgit just changed the look and feel of the widget recently to where it doesnt look good in my website anymore, but I still would like to display the info in my page.

    My home page where the widget is pasted is really a perl script. Is there a way to extract the text on this widget with a line of code and then I present it in this home page with the look and feel that matches my design..??

    If not... just the same as there are an environment variables that tell you the visitor's referrer and the IP is there one that I can use to find out what city my visitor come from..??

    Here is the widget


    Thanx beforehand
    VirtualWeb

    PS: until I find a way to delete this post here is a script that does what i was looking for... found it after posting this message.

    Code:
    <center>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"><!--
    if (typeof(google.loader.ClientLocation.address.city) != null) {
      document.write(google.loader.ClientLocation.address.city
      +", "
      +google.loader.ClientLocation.address.region);
    } else {
      document.write("Walnut Creek, CA")
    }
    // --></script>
    </center>
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    @virtualweb Thanks for posting the solution you found. We don't generally delete posts because issues are resolved. We leave them around in case anyone else has a similar issue and can employ the solution you found, even with some minor changes.

    Regards,

    Jeff

    Comment

    Working...