This is one of the thing, that previously I never thought that it would be help full, but at some point it is.
When you want some where to show the current user's Ip address on page, OR weather you want to restrict a User of a particular IP then you can use this small code snippet with some booming functionality.
Apex Class ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
VisualForce page ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
and here it is..!!!!
HAPPY CODING...!!!
When you want some where to show the current user's Ip address on page, OR weather you want to restrict a User of a particular IP then you can use this small code snippet with some booming functionality.
Apex Class ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
public class IPAddress {
//Variable to hold the IP Address value for current logged in user
public String ipAddress {get; set;}
//Constructor
public IPAddress() {
//Map to hold current URL header parameters
Map<String, String> mapHeaders = ApexPages.currentPage().getHeaders();
//Proceed further only and only if map of header parameter have not null value with it
if(mapHeaders != null) {
ipAddress = mapHeaders.get('True-Client-IP');
if(ipAddress == null){
ipAddress = mapHeaders.get('X-Salesforce-SIP');
}
}
}
}
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
VisualForce page ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<apex:page controller="IPAddress">
<h1> Current Logged In User IP Address ::::: </h1> {!IpAddress}
</apex:page>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
and here it is..!!!!
HAPPY CODING...!!!
Superb....
ReplyDeletethis gives salesforce Ip address
ReplyDeletei want my system ipv4 address to get retrieved...
how to get that
but it is not working in inline visualforce page , canu tell me the code for getting ip inline visualforce page
ReplyDeleteAre you using Standard controller on the page ?
ReplyDeleteYou there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. https://192-168-i-i.com
ReplyDelete
ReplyDelete192.168.1.254
192.168.l.254
192.168.1.1
192.168.o.1
192.168.l0.1
192.168.l.l
192.168.o.1
is a Private IP address and most powerful universal IP addresses, this is used in the Linksys router.
192.168.l.l
ReplyDelete192.168.1.254
192.168.1.1
192.168.o.1
192.168.o.1.1
10.0.0.0.1
ReplyDeleteexodus kodi
192.168.1.1
thevideo.me/pair
openload.co /pair
best kodi addons
jailbroken firestick
firestick apps
jailbreak firestick
Jailbroken Firestick Apps
How to Install Ultimate IPTV Kodi Addon
ReplyDeletewww-192-168-o-1.com
192.168.o.1
192.168.l0.1
192.168.0.1
192.168.l0.1
192.168.o.1
192.168.ll
ReplyDelete192.168.l.254
192.168.o.1
http//192.168.l.254
192.168 l0 1
This IP address is used by the routers like TP-Link, Netgear, D-Link uses it as the default IP address.
ReplyDeleteRouters are the most important devices that are required to get the internet connectivity. There are many brands and router models around the globe. Most people use multiple brand routers, they don't know how to configure them for the perfect usage. Here at
192.168.0.1 we have all the manuals for configuring the router login pages.
A round of applause for your mind blowing article. Much thanks to you. Fantastic.
ReplyDelete
ReplyDeleteThis configuration can also be used for devices like Router, Modem etc. and they are all having the initial IP address
192.168.10.1
192.168.0.1