ip-address

PHP Curl, retrieving Server IP Address

I'm using PHP CURL to send a request to a server. What do I need to do so the response from server will include that server's IP address? ...

PHP Equivalant for INET_NTOA and INET_ATON

Are there any PHP equivalents for these two functions? I tried searching but couldn't see anything. Thanks. ...

Reliable Way to get Unique Hits to an Article

Hello, I am using asp.net C# and looking for a reliable way to get genuine unique human hits to articles. My goal is to not count a hit if its a bot or non human visit. Anyone, that is blocking cookies or don't have cookies activated the hit should not count. I am afraid that someone may try to rig hits on an article by sending a bunch ...

PHP getenv('REMOTE_ADDR') serious side effects?

Hi, I am trying to grab a users' IP address to show them content relevant to their geography. I used the php code $ip = getenv('REMOTE_ADDR'); to grab their IP address. This works fine on my computer but my co-developer tried it and found that he was unable to connect to our site at all and got a "Host Not Accessible" error. He is una...

Datatype for storing ip address in SQL Server

What datatype should i choose for storing an Ip Address in a SQL Server? By selecting the right datatype would it be easy enough to filter by IP address then? ...

How to store IP address list in C# List to make it searchable for subnets too?

Hello, how should I correctly store IP address list with addresses which are subnets to make it searchable? There are two examples: I have IP address 1.2.3.4 and in my C# List there is 1.2.3.4 entry so here we have no problems. I have IP address 3.4.5.6 and in my C# List I have subnet 3.4.0.0/24. Here is my problem. How to store IP...

How do you store an IP Address (v4 or v6) as an int in any database using php?

I need to store IP address in the most compact way possible, searching is not a concern. This also needs to be compatible on Windows, Linux, and Mac using any DB (MySQL, SQLite, Postgre, etc). Thanks to the ip2long() and long2ip() functions in PHP I can convert a IP4 address to a small int field rather than a varchar(15) or whatever. Th...

Restricting access to a site using IP address

I would like to know whether there is a way of restricting the users of a site such that they can only access the inner pages of a site if they are within a certain range of IP addresses or a certain network? The current PHP scripts I am getting cant differentiate the real IPs from the Proxies? Thanks ...

Optimizing Java code

How can I optimize this code ? I made IPFilter and I need to optimize it. package com.ipfilter; import java.util.HashMap; import java.util.Map; /** * IPFilter * * Loads given IP addresses to memory, so you can easily check if ip addres has been blocked */ public class IPFilter { private Map<Integer, IPFilter> ...

Convert SQL Server signed int to Binary(4)

I messed up. I wanted to store IP addresses compactly in SQL Server and chose 'int' for the column type. 'int' are 32 bit signed integers while IPs really are 32 bit binarys. My question is: How do I convert my existing signed int into Binary(4) in SQL Server and how should I properly parse the string-IP representation from .Net 'Reques...

Django Forms clean() method - need IP address of client

I am overriding the clean() method on a Django form. I want to have access to the IP address of the client (assuming this is a bound form). If I had a reference to the request object, I could get it easily from META("REMOTE_ADDR"). However, I do not have a reference to the request. Any ideas on how this could be done? ...

php - mac address

I want to get the MAC and IP address of the connected client using php. ...

How can I get the client's IP address in a PHP webservice?

I have developed a PHP webservice. I would like to log all incoming connections of the WS clients, which are consuming this web service. How can I obtain the client's IP address? The value of $_SERVER['HTTP_CLIENT_IP'] seems to be always empty. ...

Optimal Configuration for Disgusing Identity of Scraping

I'm running a bunch of scripts that are scraping data from a website. For reasons I won't bore you with, I can't run them all off the same host--instead I need to set up six different hosts. I want to configure my hosting setup to disguise the fact that all six hosts have the same owner. I have gotten six different shared hosting acco...

How to access/ping a server located on AWS?

With what address should a server located on AWS be accessed? I've created an AWS instance and installed a web server on it. However the server is not reachable via any of the: ec2-174-129-24-92.compute-1.amazonaws.com the IP address from instance's ifconfig an elastic IP address I've created on the AWS dashboard and associated with t...

How to get local host address and subnet mask in Java ME?

Is there a way to find those values in ME (Either CDC or CLDC)? All the examples I found used SE methods. ...

How to check if an IP address is within a particular subnet

I have a subnet in the format 10.132.0.0/20 and an IP address from the ASP.Net request object. Is there a .NET framework function to check to see if the IP address is within the given subnet? If not, how can it be done? Bit manipulation, I guess? ...

how to convert IP address from char to int

Hi! I have an IP address in char type Like char ip = "192.123.34.134" I want increment the last value (134). Does anyone how should i do it? I think, i should convert it to an integer, and then back, but unfortunately i don't know how? :( I'm using C++. Please help me! Thanks, kampi ...

Is there any possible way to find the name of the country using IP with scripting language PHP ?

Hi all Is there any possible way to find the name of the country using IP with scripting language PHP ? Thanks in advance Fero ...

Restricting access to a website by IP address range / domain

Hi, I would like advice on the best way to restrict access to a weba pplication (using .net 2.0 and II6) based on the clients IP address. The two ways I am considering: 1) Through the server side code - check the client I.P against a list of IP addresses within the web.config. 2) Through IIS by creating a virtual directory and restric...