By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

Extract text from a Website Stats Widget

P: 30
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
http://feedjit.com/fg/

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.

Expand|Select|Wrap|Line Numbers
  1. <center>
  2. <script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"><!--
  3. if (typeof(google.loader.ClientLocation.address.city) != null) {
  4.   document.write(google.loader.ClientLocation.address.city
  5.   +", "
  6.   +google.loader.ClientLocation.address.region);
  7. } else {
  8.   document.write("Walnut Creek, CA")
  9. }
  10. // --></script>
  11. </center>
  12.  
Jun 11 '10 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
@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
Jun 30 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.