I have been running into walls with this for a while.
I am attempting to setup multiple IP addresses on Snow Leopard so that I can develop with SSL certificates. I am running XAMPP - I don't know if that is the problem, but I guess I would run into the same problems, considering the built in apache is turned off.
So first up I looked i...
Sir,
I developing a site. In which i get the IP addresses of the users from where they are entered. Now i want to find the State,City and country from where they are entering.That means i want to find the state, country, city from the IP address of the user. the code i need in php. can you help me to do that
...
Hi All,
This might be one of those "huh, why?" questions, but I figured it would be worth the try.
How would one, from a server-side application, use the clients IP address as the applications IP address to another website? The basic idea is that any work the server side application does, is seen as the client itself doing the work, an...
Aside from the obvious (localhost, 127.0.0.1) does PHP (command line interface!) have a mechanism for discovering the IP of the computer the script is running on?
$SERVER[] will not work as this is not a Web app - this is a command line script.
TIA
...
I am debugging a networking code and want to print ip addresses which are declared as int32.
when i print it using gdb print command, i get some values which is not much meaningful.
How can i possibly print them in meaningful format?
...
I want to try and get the ip address of a client after calling accept. This is what I have so far, but I just end up getting some long number that is clearly not an ip address. What could be wrong? Thanks to anyone who replies.
int tcp_sock = socket(AF_INET, SOCK_STREAM, 0);
sockaddr_in client;
client.sin_family = AF_INET;
socklen_t...
I would like to have all locally bound IP addresses, basically an array of java.net.InetAddress. I know I can call InetAddress.getAllByName() with the host name, but I was wondering if there is a more direct way that doesn't involve DNS and/or knowledge of the host name.
...
My client pc is connected to as server pc via sockets over Ethernet, How do I find the IP of this client from the server side code.
The server is dishing out one socket per client in a new Thread.
When I do a csocket.getLocalAddress().toString() on the client socket I still get the Server IP address. (csocket is the socket that the Serve...
I am experiencing a strange problem with my website today.
I have my local code in aspx , which i can browse perfectly in ie and firefox, I publish it in my computer and create a virtual web site and then browse it with both firefox and ie like http://localhost/testwebsite/default.aspx and it displays also perfectly but when switching f...
The following code binds specified ip address to socket in main program globally.
import socket
true_socket = socket.socket
def bound_socket(*a, **k):
sock = true_socket(*a, **k)
sock.bind((sourceIP, 0))
return sock
socket.socket = bound_socket
Suppose main program has 10 threads, each with a urllib2 instance running insid...
Hi all,
If I have a block of private IP addresses such as 171.58.0.0/12, does this mean that I essentially bitwise AND the 32-bit version of 171.58.0.0 with 32 bits of 1's, the last 12 of which are 0'd out, to get the longest prefix of acceptable private IP addresses in that range?
10101011.00111010.00000000.00000000 (171.58.0.0) AND
1...
Using the output of "ipconfig /all" i can get what I need but I want a more reliable technique to get ip of an interface (practically the interface has to be identified by it's name) in case of ipconfig was corrupted or was not available for any reason.
...
I need to deny all IPs except mine.
I got my outward facing IP from whatismyip.com. Let's assume it is 200.200.200.200
Here is the beginning of my .htaccess
ErrorDocument 403 /down.html
<Limit GET POST>
order deny,allow
deny from all
allow from 200.200.200.200
</Limit>
This works with the denying part - it shows my down.html page. ...
I have a network of computers that they will connect to the a server with DHCP, so I don't know what Ip address a computer will get when I connects to the server. If 192.168.0.39 for example is connected to the server can I identify the real computer behinde this ip address? ( I can install an external application on each client in order...
Hello,
I need some code to get the address of the socket i just created (to filter out packets originating from localhost on a multicast network)
this:
socket.gethostbyname(socket.gethostname())
works on mac but it returns only the localhost IP in linux... is there anyway to get the LAN address
thanks
--edit--
is it possible to ge...
I want to show country flag depending on ip address I receive at server side.
Are fixed ip addresses are assigned to countries ? Where can I get database for ip address to country mapping ?
...
Is there a way for a java web app to get information on the security certificates installed on one's machine via a http request and selectively grant access if a particular certifiicate is installed on the machine.
Basically the requirement is, the web application should entertain request only from a company laptop else must deny acces...
I need the fastest way to see if an ip address is reachable. On each ip address theres a server listening on a specific port so let me know if your method is about to find if a server is listening on a port.
The reason for this is that suppose I have 10 ip addresses with 10 server listening on port 101 on each ip address. I want my clie...
Hi, I know I can do this easily by converting the IP addresses to decimal notation first using PHP built in functions like up2long and long2ip. I just want to be able to do the same using the standard IP address notation as an exercise.
The problem I am thinking goes like this: Given an starting IP address, say 192.168.1.100, and an end...
I've been using getaddrinfo for looking up socket addresses for basic socket commands. Recently, though, the addresses it returns to me are for bogus IP addresses, which I have found using inet_ntop. I've tried my code, as well as that provided in Beej's Guide, and they both produce the same results. Here's the code:
struct addrinfo hin...