View Larger Image How to capture client’s IP in PHPFollowing function in PHP, helps you to capture client’s code on page, like a form :Copy to Clipboardfunction get_client_ip() { $ipaddress = ''; if (getenv('HTTP_CLIENT_IP')) $ipaddress = getenv('HTTP_CLIENT_IP'); else if(getenv('HTTP_X_FORWARDED_FOR')) $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); else if(getenv('HTTP_X_FORWARDED')) $ipaddress = getenv('HTTP_X_FORWARDED'); else if(getenv('HTTP_FORWARDED_FOR')) $ipaddress = getenv('HTTP_FORWARDED_FOR'); else if(getenv('HTTP_FORWARDED')) $ipaddress = getenv('HTTP_FORWARDED'); else if(getenv('REMOTE_ADDR')) $ipaddress = getenv('REMOTE_ADDR'); else $ipaddress = 'UNKNOWN'; return $ipaddress; }By Mir Saeid|2020-12-10T11:44:24-05:00November 12th, 2020|Blog|0 CommentsShare This Story, Choose Your Platform!Facebook About the Author: Mir Saeid Experienced computer engineer with post graduate diploma in e-Business, Web Developer and Programmer Related Posts Redirect to a Custom Thank You Page After Checkout in WooCommerce Without Any Plugins Gallery Redirect to a Custom Thank You Page After Checkout in WooCommerce Without Any Plugins Add second description to category and shows up under products in WordPress Gallery Add second description to category and shows up under products in WordPress ajax-loader.gif problem Gallery ajax-loader.gif problem How to Configure SMTP for office 365 in Easy WP SMTP Plugin – WordPress Gallery How to Configure SMTP for office 365 in Easy WP SMTP Plugin – WordPress How to Check Disk Space Usage on Google Cloud Gallery How to Check Disk Space Usage on Google Cloud