Check if client is using shared internet or not

Submitted by:David Villa

Date added:17 October, 2016

Category:PHP

if client is on shared internet, returns true
if client is not on shared internet, returns false

Tags: shared internet

Code Snippet:

 <?php
/******************************************************
*
* isSharedInternet
* checks whether client is on shared internet or not
* $_SERVER['HTTP_CLIENT_IP'] is pivotal here
* if client is on shared internet, returns true
* if client is not on shared internet, returns false
*
******************************************************/

function isSharedInternet(){
return (!empty($_SERVER['HTTP_CLIENT_IP'])) ? true : false;
}
?>
 
 

Comments