PHP | geoip_isp_by_name() Function Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The geoip_isp_by_name() is an inbuilt function in PHP , which helps to get the ISP(Internet Service Provider) of the corresponding IP address .The function is available only for a commercial GeoIP ISP Edition user and gives a warning if the database is not found . Syntax : string geoip_isp_by_name ( string $hostname ) Parameters : The function geoip_isp_by_name() only accepts a single parameter as mentioned above and explained below : $hostname : It is the only parameter accepted by the function. It is the hostname or IP address for which the function will generate the ISP( Internet Service Provider ) . Return Value : The above function returns the Internet Service Provider(ISP) name on success and returns FALSE on failure( that is , if the database doesnot contains the address ) . Examples : Below is the implementation of above explained function . Program [sourcecode language="php"] <?php //PHP code implementing geoip_isp_by_name() function $sample = geoip_isp_by_name('www.example.com'); //checks if the ISP is valid if($sample) //prints the value of ISP for corresponding IP address echo "Required ISP is " . $sample ; ?> [/sourcecode] Output : Required ISP is ICANN c/o Internet Assigned Numbers Authority Reference : https://www.php.net/manual/en/function.geoip-isp-by-name.php Comment More infoAdvertise with us Next Article PHP | gethostname() Function P priya_1998 Follow Improve Article Tags : PHP Similar Reads PHP | geoip_asnum_by_name() Function The geoip_asnum_by_name() is an inbuilt function in PHP which helps us to get the Autonomous System Number (ASN). The function will help us to get the ASN by taking an IP address as an argument . Syntax : string geoip_asnum_by_name ( string $hostname ) Parameters : The function accepts a single para 1 min read PHP | geoip_asnum_by_name() Function The geoip_asnum_by_name() is an inbuilt function in PHP which helps us to get the Autonomous System Number (ASN). The function will help us to get the ASN by taking an IP address as an argument . Syntax : string geoip_asnum_by_name ( string $hostname ) Parameters : The function accepts a single para 1 min read PHP | gethostname() Function The gethostname() function is an inbuilt function in PHP which returns the host or domain name for the local machine. This function is applicable after PHP 5.3.0 before that there was another function called php_uname function. Syntax: string gethostname( void ) Parameters: This function doesn't acc 1 min read PHP | gethostnamel() Function The gethostbynamel() function is an inbuilt function in PHP which returns a list of IPv4 address for a specified internet host/domain name. Syntax: gethostbynamel( string $hostname ) Parameters: This function accepts single parameter $hostname which is required. It specifies the hostname whose IPv4 1 min read PHP | geoip_country_code_by_name() Function The geoip_country_code_by_name() is an inbuilt function in PHP which helps to generate the two-letter country code (Each country is assigned a two-letter country code. For Example: US for United States). The function takes the hostname or IP Address as an argument and generates the two letter countr 2 min read PHP | geoip_country_code_by_name() Function The geoip_country_code_by_name() is an inbuilt function in PHP which helps to generate the two-letter country code (Each country is assigned a two-letter country code. For Example: US for United States). The function takes the hostname or IP Address as an argument and generates the two letter countr 2 min read Like