ip-address

How to get IP address of your application server

I need to be able to find the IP address of the server the page is currently executing on. I have some code that calls a third party site and has to pass a specific key that changes depending on which server it is on. Is there a CGI variable or some way in ColdFusion to determine what the IP address is of the host server? ...

How can I parse IP addresses and address ranges with Perl?

I have list of IPs: 238.51.208.96/28 238.51.209.180-199 238.51.209.100-109 238.51.213.2-254 ... How can I easily parse them? I need first and last IP from range. For the first line I can use Net::Netmask CPAN module, but what can I do with others lines? ...

How do I find the IP address of a GPRS modem?

I want to pull data from a device that is accessed via a serial protocol and has a GPRS modem attached which should allow transparent access over an IP connection. It seems to me that this approach is upside down, because how should I know at which IP address the device currently is? Unfortunately, the device itself is rather dumb, so I ...

Order by in Postgresql to sort IP address ?

Hi, I've another question I wish to sort a list of IP address. Are there any functions in Postgresql to use with the order by like INET_ATON in MySql ? My current IP is on string format. Thx. Narglix ...

comparing actual IP with partial IP in PHP

Using PHP I'd like to compare an actual ip address to part of one, and see if it matches. For example I want to see if the address matches 12.34.. <?php $rem_address = getenv('REMOTE_ADDR'); $temp = substr ($rem_address,0,6) if ($temp == "12.34.") echo "It's a match"; ?> Is there an easier/better way to do this? ...

Why does right shift in PHP return a negative number?

I am trying to query a bittorrent tracker and am using unpack to get the list of IPs from the response. So, something like this: $ip = unpack("N", $peers); $ip_add = ($ip[1]>>24) . "." . (($ip[1]&0x00FF0000)>>16) . "." . (($ip[1]&0x0000FF00)>>8) . "." . ($ip[1]&0x000000FF); But, for some reason, I am getting the following IP addresses...

Fast file search algorithm for IP addresses

Question What is the fastest way to find if an IP address exists in a file that contains IP addresses sorted as: 219.93.88.62 219.94.181.87 219.94.193.96 220.1.72.201 220.110.162.50 220.126.52.187 220.126.52.247 Constraints No database (e.g., MySQL, PostgreSQL, Oracle, etc.) Infrequent pre-processing is allowed (see possibilities...

How to use a specific IP to access specific sites by?

My Company registered in certain services on the Web and are relying on the company's IP to use these services, Director asked me to allow some staff to enter these sites from outside the company, after authorized staff enter to comany's site. How could they use the company's IP to allow them to browse services sites? Do I need to use...

Ip address of the client machine

Please let me know how to get the client IP address, I have tried all of the below things , but I am getting the same output: 127.0.0.1 string strClientIP; strClientIP = Request.UserHostAddress.ToString(); string strHostName = System.Net.Dns.GetHostName(); string clientIPAddress = System.Net.Dns.GetHostAddresses(strHostName).GetValue(...

Get Local IP-Address using Boost.Asio

Hey, I'm currently searching for a portable way of getting the local IP-addresses. Because I'm using Boost anyway I thought it would be a good idea to use Boost.Asio for this task. There are serveral examples on the net which should do the trick. Examples: Official Boost.Asio Documentation Some Asian Page I tried both codes with jus...

Identify machines behind a router uniquely based on ipaddress

Some background first. I have a .net client agent installed on each of the machines in the lan. They are interacting with my central server [website] also on the same lan. It is important for my website to figure out which of the machines can talk to each other. For example, machines of one subnet cannot directly talk to machines of ano...

Help in getting Logical address of my system using C++ & Linux

Please suggest how to get the IP address of my system (logical address) using C++ and Linux. Thanks in advance ...

Performing urlopen from various IP addresses - Python

Hi folks, is it possible to perform urlopen requests from different IP addresses? ...

How can I get the IP address of my local machine the .NET 3.5 way?

I've found a ton of tutorials, however they are all very old for 1.1 or 2.0; there must be an easier way now with .NET 3.5. Care to share? :) ...

Identifying the Ipaddress of the Folders in the BLuehost server.....

Hi, we have hosted our site in Bluehost server.We are having 2 websites running by bluehost server. In our bluehost server->file manager we have 2 separate folders namely abc,xyz which is pointing to the site abc.com and xyz.com . I dont know how to find the Ipaddress of those folders. Note: We faced some prblms...

Form Input - Restricting to one submit per IP / Computer

I'm coding a sweepstakes entry form in php where the User submits some information in a form and it is stored in a database. I would like to find a way to restrict this form to one submission per person. Either dropping a cookie or by IP address. What would be the best way to approach this? I'm building it on code igniter, if that make...

localhost not going to desired VirtualHost

I have several VirtalHosts set up on my computer. I'd like to visit the site I'm currently working on from a different PC using the my comp's ip address, but every config i've tried keeps taking me to a different virtual host (in fact the first virtualhost I set up on my comp). How do I set up the apache virtualhost configs to ensure t...

INET_ATON() and INET_NTOA() in PHP?

I want to store IP addresses in my database, but I also need to use them throughout my application. I read about using INET_ATON() and INET_NTOA() in my MySQL queries to get a 32-bit unsigned integer out of an IP address, which is exactly what I want as it will make searching through the database faster than using char(15). The thing is...

domain name vs ip address, same server, but different speed

I have two similar sites: - two of them have almost exactly the same codes, and running on the same server - both sites are the same, they just use different language. - database of the slower site is populated (maybe only the user table) the other tables for site content is the same - the faster uses root to access database one of the ...

Issue with remote IP address retrieval when using a proxy

This is a followup for this question. When I used the proxy flag with mod_rewrite, I did not know all of its effects. Now I have two more problems, which need to be fixed! The main problem is with user IP addresses, everyone appears to use the server IP. I can't trust http-x-forwarded-for because it is easy to forge headers, and the RE...