I'm using cPanel from someone else who resold it to me.
This will probably mean I cannot use mod_cloudflare
I would like to get the visitor's IP and not CloudFlare IP. The part of code I'm using:
$_SERVER['REMOTE_ADDR']
That line will get the IP of cloud flare and not the original user's IP.
Is there any way I can get the original IP address from the visitor?
I used following Functions in my application: http://ipaddress.standingtech.com/ to exclude CloudFlare IP address
Akam's answer is too complicated and does not work. Here's a simpler way:
Yes, but without access to the server configuration, you will be unable to utilize
$_SERVER['REMOTE_ADDR']
.However, you can still use
X-Forwarded-For
andCF-Connecting-IP
. Both would be available in the$_SERVER
super-global.