Welcome To Snipplr
Everyone's Recent Snippets Tagged ip
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
returns "City, State" if found otherwise defaults to "Hollywood, CA"
18
14626
posted 15 years ago by crypticsoft
This code redirects all external traffic (all traffic not belonging to a particular ip) to a temp page. This is useful for performing site maintenance.
2
1745
posted 15 years ago by BFTrick
This function will fetch the real IP address of the user even if he is behind a proxy server.
1
2104
posted 16 years ago by jrobinsonc
C#
Get the network interface card (NIC) from a known MAC address (and get the IP addresses on that NIC)
The code shows how to take a known MAC (e.g. "00:00:00:11:22:33") and locate the NIC which has that MAC. Note that the built-in MAC class for .NET is called PhysicalAddress (in System.Net.NetworkInformation). PhysicalAddress.Parse can take a string,...
0
2814
posted 16 years ago by pckujawa
Use wget and sed to get your public IP adress (instead of firing up firefox and visting whatismyip.com). Usefull in scripts where you need your public IP adres.
There are probably better ways, maybe even a GNUtool that I missed?
0
1867
posted 16 years ago by berkes
Count how many users are connected to a site (execute this function in every page, put it in the header).
1
2142
posted 16 years ago by ginoplusio
This function will fetch the real IP address of the user even if he is behind a proxy server.
0
1685
posted 16 years ago by paulgrenwood