PDA

View Full Version : IP to flag/country


lmgc
02-15-2011, 11:43 AM
Hello vb's

is there any way to detect automaticly the user's country and show a flag for that in the profil ?

your24hourstore
02-15-2011, 11:54 AM
there is a mod that shows the flag of the country of the register, and you could make them select their country , although they could lie, but a flag is displayed in the postbit legacy area of the posts, you would then be able to double check them by grabbing their IP and checking it against the list using a site like this one (http://www.ip2location.com/)

or this one (http://www.melissadata.com/lookups/iplocation.asp)you could even edit the php file that is in that mod to reflect the ip of the country in the postbit legacy also, but you will need a list of each and every Ip used by a country , or that is on your server.
it would be daunting here is a command line input command that will ping

Open Command Prompt and type:
FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses.txt
The "-n 1" is for only 1 ping packet to be sent to each computer.
Change 192.168.0 to match you own Network ID.
This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply. this may work to do what I have said here but would have to be done every once in a while then added to the list IPADDRESSES.TXT

lmgc
02-15-2011, 03:59 PM
thank you man,

are you talking about this mod :
https://vborg.vbsupport.ru/showthread.php?t=229511

your24hourstore
02-15-2011, 06:20 PM
thank you man,

are you talking about this mod :
https://vborg.vbsupport.ru/showthread.php?t=229511

yes that's it, i actually modified it to do states instead of country's :)

brihan
02-22-2013, 08:33 PM
yes that's it, i actually modified it to do states instead of country's :)

Hi Your24HourStore,

Would you mind sharing how your modified it to do state flags rather than country flags?

Thanks!

Brian

brihan
03-06-2013, 06:59 PM
Hi,

I have tried to contact your24hourstore to see how he/she was able to make it show state flags rather than country flags but he/she does not accept email or PM from this site.

Can anyone else help me with this?

Thank you,

Brian

Krusty1231
03-07-2013, 11:29 AM
If you wanted state icons instead of country icons you would follow the exact same steps as in the mod link https://vborg.vbsupport.ru/showthread.php?t=229511

You would of course need to find state flags: http://www.google.com/search?q=state+flags&hl=en&lr=&as_qdr=all&tbm=isch&tbo=u&source=univ&sa=X&ei=Woc4UZalIPCGyQHR-oDoBw&ved=0CEsQsAQ&biw=1280&bih=909

You would follow the same steps as in the mod link -

Title = STATE Flag
Description = Add your STATE flag to your profile:
Profile Field Category = (Uncategorized)
Options = Copy & Paste the Whole contents of the file attached below (OPTIONS)
Set Default = None
Display Order = You Select this (dependant on how many you already have)
Field Required = yes, at registration and profile updating
Field Editable by User = Yes
Private Field = No
Field Searchable on Members List = No
Show on Members List = Yes

You would need to create a list of STATES and copy that in the options of the User Profile field instead of using the flag one provided.

I hope that makes sense.