PHP | geoip_isp_by_name() Function Last Updated : 08 Jul, 2018 Comments Improve Suggest changes 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 : http://php.net/manual/en/function.geoip-isp-by-name.php Comment More infoAdvertise with us Next Article PHP | geoip_isp_by_name() 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 | 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 | gethostbyname() Function The gethostbyname() function is an inbuilt function in PHP which returns IPv4 address for a specified host/domain name. Syntax: string gethostbyname( $hostname ) Parameter: This function accepts single parameter $hostname which is required. It specifies the hostname whose IPv4 address to be found. R 1 min read PHP | geoip_continent_code_by_name() Function The geoip_continent_code_by_name() function is an inbuilt function in PHP which helps to generate a two-letter continent code(Each continent has assigned a two-letter code. For example - AF for Africa, AS for Asia, and many more). The function takes the hostname or IP Address as an argument and gene 1 min read PHP | getservbyname() Function The getservbyname() function is an inbuilt function in PHP which returns the port number for given protocol and Internet service. Syntax: int getservbyname( string $service, string $protocol ) Parameters: This function accepts two parameters as mentioned above and described below: $protocol: It is r 2 min read PHP | geoip_db_avail() Function The geoip_db_avail() function is an inbuilt function in PHP which is used to check whether a GeoIP database is available or not. The function does not consider the proper existence of a file instead it checks whether it is readable or not. Syntax: bool geoip_db_avail( $database ) Parameters: This fu 2 min read PHP | getprotobyname() Function The getprotobyname() function is an inbuilt function in PHP which returns the protocol number for a specified protocol name. Syntax: int getprotobyname( string $name ) Parameters: This function accepts single parameter $name which is required. It specifies the protocol name, like tcp, icmp, udp, ip 1 min read Like