ip-address

get cultureinfo with country code

Hi, I try to get CultureInfo with country code. I'm using hostip.info for getting country code. For example, "http://api.hostip.info/?ip=207.46.197.32&position=true" returns me "US" for country code or http://api.hostip.info/?ip=82.151.131.196&position=true returns "TR". If I could have "en-US", "tr-TR", it's easy, but I can't...

Will blocking IP-addresses of spammers also block visitors?

My website's comment function is being constantly bombarded with spam posts from these two IP addresses: 94.102.63.11 83.233.30.42 I am currently blocking them at the text level since they all have: weebly.com in them, and I would think that if I block them by IP address then I might also block authentic users. Is it true tha...

getting latitude and longitute information from a web visitor

TO use google maps it seems you have to have the lat and long for a visitor to plot them on a map. Are there any free libraries that will give you this information given a IP address? ...

How could I block all non-US IP addresses from access to my website?

I want to block all non-US users from accessing my website. I'm using nginx on the front end and have a django powered website. 1) How can I determine what are US IP addresses? 2) Should I be blocking them in my webserver or in my application layer? ...

Restricting an IP if it is between an IP Range.

Ok, it's friday afternoon, and i've had a long week so would appreciate some help! Currently, i have a list of IP ranges, as follows: List<IPRange> ipRanges = new List<IPRange>(); ipRanges.Add(new IPRange { From = "145.36.0.0", To = "145.36.255.255" }); ipRanges.Add(new IPRange { From = "194.183.227.184", To = "194.183.227.191" }); ipR...

How get Visitors IP Address and Country ID in website

How write code in ASP to get website visitors IP address and Country ID ? Plz help me, Alex ...

What is the most accurate way to retrieve a user's correct IP address in PHP?

I know there are a plethora of $_SERVER variables headers available for IP address retrieval. I was wondering if there is a general consensus as to how to most accurately retrieve a user's real IP address (well knowing no method is perfect) using said variables? I spent some time trying to find an in depth solution and came up with the...

which is the better way to get the ip...

What is the better way of getting the IP address in PHP: getenv('REMOTE_ADDR'); or, $_SERVER['REMOTE_ADDR']; please tell me the difference, if any, between the two. ...

finding the IP address inAdobe AIR

how to know the P address of the system in which the AIR application is currently running? or how to restrict the usage of AIR application for a particular country? ...

Integer to IP Address - C

Hi guys... I'm preparing for a quiz, and I have a strong suspicion I may be tasked with implementing such a function. Basically, given an IP address in network notation, how can we get that from a 32 bit integer into a string in it's dotted decimal notation (something like 155.247.182.83)...? Obviously we can't be using any type of inet...

IP Address to Integer - C

Hey guys, I previously posted how to implement a function that will convert an integer to an IP address string. So how would we go vice-versa, that is, given a string (154.111.23.23) that is an address, how can we get that integer back, using no inet functions. ...

How can I send data to multiple IPs in VB.NET with TCP/IP sockets?

I have an array of IP addresses, and I want to send the same data to all of them. I could just send the loop code that sends data but I think there's a better way of doing this. I've heard of multicast, what exactly is it? I think it's what I need but how do i use it. ...

what ip address does accept return

see the following code: accept(sockfd, (struct sockaddr*)&cliaddr, &slen); cout << inet_ntop(AF_INET, cliaddr.sin_addr, ipv4addr, 100); my client connects from localhost. i get an absurd address in the output. this is not my ip address. everytime i run the code i get a different ip address. when i ping that ip address i don't get any ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = AF_INET; sasend.sin_port = htonl(portno); inet_ntop(maddr, &(sasend.sin_addr.s_addr)); struct sockaddr_in sarecv; memcpy(&sarecv, &sasend); ...

where is class E ip addresses?

I am reading Richard Stevens' TCP/IP illustrated Vol1.He said class E ip addresses are reserved for future use.Considering he wrote the book at 1994,now is the future.So where is the class E ip addresses? I tried to ping 240.0.0.3 but windows returns Destination specified is invalid thanks. ...

multicasting on linux

i am testing a simple multicast application on linux. i got it working on my pc by doing the following: disabling the firewall running the command route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 if you are interested in the details, see this post why are these two steps required? is there an alternative. i am testing the code o...

possible to detect ISPs that give user different IP address on every page request for login security?

We recently attempted to add ip address validation to our website's login security. So in addition to having a cookie with valid credentials, we checked that your ip address on page request matched the one you initially signed in with. The idea was that if your cookie is stolen, a different user cannot impersonate you unless they actua...

How do I create valid IP ranges given an IP address and Subnet mask in Perl?

How do I create valid IP ranges given an IP address and Subnet mask in Perl? I understand the concept of generating the IP ranges but need help writing in Perl. For example, if I AND the IP address and subnet mask I get the subnet number. Adding 1 to this number should give me the first valid IP. If I invert the subnet mask and OR with t...

Obtain MAC Address from Devices using Python

I'm looking for a way (with python) to obtain the layer II address from a device on my local network. Layer III addresses are known. The goal is to build a script that will poll a databases of IP addresses on regular intervals ensuring that the mac addresses have not changed and if they have, email alerts to myself. ...

Proper way to scan a range of IP addresses

Given a range of IP addresses entered by a user (through various means), I want to identify which of these machines have software running that I can talk to. Here's the basic process: Ping these addresses to find available machines Connect to a known socket on the available machines Send a message to the successfully established socke...