Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Can I display users country in their posts on my forum?
Old 11-27-2010, 09:38 PM Can I display users country in their posts on my forum?
Junior Talker

Posts: 3
Name: Paul
Trades: 0
not sure if this is right place to get help with some code to do this but after some searching i read that JavaScript cant do what I want but PHP can...

I have a forum http://forum.dslbuddy.net/ and i want to display users country/flag in with their posts at bottom their post or next to username or such...

can anyone help me with this?

thanks
snadge is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-28-2010, 07:39 PM Re: Can I display users country in their posts on my forum?
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
It's pretty easy: check IP address when they log in and set a country cookie. You can get IPA/country databases from various places (as flat text/csv files) and code is straightforward. See http://software77.net/geoip-software.htm for various resources.
PaulW is offline
Reply With Quote
View Public Profile
 
Old 11-28-2010, 08:01 PM Re: Can I display users country in their posts on my forum?
Junior Talker

Posts: 3
Name: Paul
Trades: 0
Quote:
Originally Posted by PaulW View Post
It's pretty easy: check IP address when they log in and set a country cookie. You can get IPA/country databases from various places (as flat text/csv files) and code is straightforward. See http://software77.net/geoip-software.htm for various resources.
could you guide me? - i dont know any code as such, its a free forum host does this mean i cant do it? I dont know thats why Im asking - I can add Javascript to my forum

thanks
snadge is offline
Reply With Quote
View Public Profile
 
Old 11-28-2010, 08:17 PM Re: Can I display users country in their posts on my forum?
Skilled Talker

Posts: 78
Name: Renz Cartujano
Trades: 0
I think it's very hard to do that. I need also a guide for it.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
rseobeginner is offline
Reply With Quote
View Public Profile Visit rseobeginner's homepage!
 
Old 11-28-2010, 08:28 PM Re: Can I display users country in their posts on my forum?
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
Quote:
Originally Posted by snadge View Post
could you guide me? - i dont know any code as such, its a free forum host does this mean i cant do it? I dont know thats why Im asking - I can add Javascript to my forum

thanks
You can't do it just using Javascript: you need to be able to look up an IP address in a data file to get the country name. Check with your forum provider to see if they already offer the facility (they may well do). If they don't, check that they will let you add the datafile and php to your forum. PM me if so and I'll post the code.
PaulW is offline
Reply With Quote
View Public Profile
 
Old 11-29-2010, 01:10 PM Re: Can I display users country in their posts on my forum?
Extreme Talker

Posts: 156
Trades: 0
I think you would need some kind of GEO-IP database, theres a popular free one available for PHP if you search for Maxmind
dagaul101 is offline
Reply With Quote
View Public Profile
 
Old 11-29-2010, 05:06 PM Re: Can I display users country in their posts on my forum?
Junior Talker

Posts: 3
Name: Paul
Trades: 0
ok thanks for the info and offer of help, I wll PM the hosts but i dont think they will
snadge is offline
Reply With Quote
View Public Profile
 
Old 11-30-2010, 08:27 AM Re: Can I display users country in their posts on my forum?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
So why has everybody decided this has to be done by using the IP?????

http://www.ipbcustomize.com/topic/981-country-flags/
http://mods.invisionize.com/index.php/f/5598
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-30-2010, 08:40 AM Re: Can I display users country in their posts on my forum?
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
Quote:
Originally Posted by chrishirst View Post
So why has everybody decided this has to be done by using the IP?????
First write your compiler ...

Last edited by PaulW; 11-30-2010 at 08:41 AM..
PaulW is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can I display users country in their posts on my forum?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.77497 seconds with 12 queries