Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

geoip_country_name_by_name(3) [php man page]

GEOIP_COUNTRY_NAME_BY_NAME(3)						 1					     GEOIP_COUNTRY_NAME_BY_NAME(3)

geoip_country_name_by_name - Get the full country name

SYNOPSIS
string geoip_country_name_by_name (string $hostname) DESCRIPTION
The geoip_country_name_by_name(3) function will return the full country name corresponding to a hostname or an IP address. PARAMETERS
o $hostname - The hostname or IP address whose location is to be looked-up. RETURN VALUES
Returns the country name on success, or FALSE if the address cannot be found in the database. EXAMPLES
Example #1 A geoip_country_name_by_name(3) example This will print where the host example.com is located. <?php $country = geoip_country_name_by_name('www.example.com'); if ($country) { echo 'This host is located in: ' . $country; } ?> The above example will output: This host is located in: United States SEE ALSO
geoip_country_code_by_name(3), geoip_country_code3_by_name(3). PHP Documentation Group GEOIP_COUNTRY_NAME_BY_NAME(3)

Check Out this Related Man Page

GEOIP_COUNTRY_CODE3_BY_NAME(3)						 1					    GEOIP_COUNTRY_CODE3_BY_NAME(3)

geoip_country_code3_by_name - Get the three letter country code

SYNOPSIS
string geoip_country_code3_by_name (string $hostname) DESCRIPTION
The geoip_country_code3_by_name(3) function will return the three letter country code corresponding to a hostname or an IP address. PARAMETERS
o $hostname - The hostname or IP address whose location is to be looked-up. RETURN VALUES
Returns the three letter country code on success, or FALSE if the address cannot be found in the database. EXAMPLES
Example #1 A geoip_country_code3_by_name(3) example This will print where the host example.com is located. <?php $country = geoip_country_code3_by_name('www.example.com'); if ($country) { echo 'This host is located in: ' . $country; } ?> The above example will output: This host is located in: USA SEE ALSO
geoip_country_code_by_name(3), geoip_country_name_by_name(3). PHP Documentation Group GEOIP_COUNTRY_CODE3_BY_NAME(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding how done IT

HellOooO, How I can find how delete a drictory in the system.If there's 2 root one of them outside the country but we have WAN so he can access the network from outside >>>> we are using same account so how I can know who done it I want to proof that. Regards (5 Replies)
Discussion started by: geoquest
5 Replies

2. Shell Programming and Scripting

Creating file contents using contents of another file

Hi, I am not sure how to start doing this so I hope to get some advice as to how to start. I have 2 files. The source file contains data that I needed is in columns delimited by ";". For example, in this format: "CONTINENT","COUNTRY","CITY","ID" "asia","japan","tokyo","123"... (21 Replies)
Discussion started by: ReV
21 Replies

3. UNIX for Dummies Questions & Answers

merging two lines in a file

Hi All, I want to merge two lines in a file till the end of the file. So what could be the command to get so. say file name : sample.txt contents: country=1 send apps =1 rece=2 country=2 send apps =3 rece=3 .. ... output: country=1;send apps =1 rece=2 country=2;send apps =3... (6 Replies)
Discussion started by: thaduka
6 Replies

4. Shell Programming and Scripting

replace a string

hello I have a file where an entry needs to be modified. an example of this entry is: install_location=/xena/sybase/ase12_5 I need to replace xena with another hostname (`hostname` output) for example: install_location=/dx1/sybase/ase12_5 how to do that? thanks (11 Replies)
Discussion started by: melanie_pfefer
11 Replies

5. UNIX for Dummies Questions & Answers

Printing hostname

Hi, I am using hostname environment variable in my shell script to print the host name but it's printing nothing.Can you please help me on this. Please find the part of the code pasted here: llist= llist=$(ps -ef | grep -v grep | grep -c "$1") echo "Hostname is ${hostname}" (7 Replies)
Discussion started by: gbiswal
7 Replies

6. Shell Programming and Scripting

Passing parameter from one file to shell script

Hi All, I have a 2 files. File1 i am generating using an ETL tool, which is a comman seperated delimited file which contains country code & load date. everytime, this country code will be updated from a table. It might be AB or BA & ld_date will be for which date we need to load the file. ... (7 Replies)
Discussion started by: Amit.Sagpariya
7 Replies

7. Shell Programming and Scripting

Dynamic calculation

Hi Experts, please see below are the dynamic text files. abc,445,hhh,data,10,country,data,88,city abc,445,hhh,data,10,country,data,88,city abc,445,hhh,data,10,country,data,88,city abc,445,hhh,data,10,country,data,200,city abc,445,hhh,data,10,country,data,88,city,games,100,data,20,basket... (10 Replies)
Discussion started by: shary
10 Replies

8. What is on Your Mind?

Where have you been?

Found this site where you can check boxes for countries where you've been and draws a map for you. It doesn't mean that you've seen the length and breadth of a country, though. Just being to a single city is enough to mark the whole country as 'visited'. This is what my map looks like:... (20 Replies)
Discussion started by: blowtorch
20 Replies

9. Shell Programming and Scripting

input -output file

Hi, I am having an Input file .which is having a list of names. comapring with our database , needs to write the out put in file called output.txt , format should be name--> country--->phone number could you please help me.. thanks in advance (7 Replies)
Discussion started by: hegdeshashi
7 Replies

10. Shell Programming and Scripting

Deleting line with range check in awk

Consider a input.txt as: country=india ram ajit sham vijay //need to be removed country=india suman tharan raju what i did is: awk '$0~pat {n=NR+4} NR!=n' pat='country=india' input.txt > output.txt My looking to the above code is between any two country=india ,... (8 Replies)
Discussion started by: Gautham
8 Replies

11. Shell Programming and Scripting

Script Shell Extracting hostname

Hi all, Please i have to get hostname of an ip address (172.16.68.4). so i have used the command 'host' host $ipaddr >> iptohostname.txt Here is my file: iptohostname.txt 4.68.16.172.in-addr.arpa domain name pointer g-4.xxx.yyyy.zz. 3.68.16.172.in-addr.arpa domain name pointer... (11 Replies)
Discussion started by: chercheur111
11 Replies

12. AIX

AIX Syslog where the hostname sit

Dear all experts, I would like to know where can I find the hostname located as when I receive the syslog, I can only see as below : (showing in localhost instead of the hostname) Feb 6 15:31:31 localhost syslog:info syslogd: restart Feb 6 15:31:50 localhost syslog:info syslogd: restart Feb... (13 Replies)
Discussion started by: kwliew999
13 Replies

13. UNIX for Beginners Questions & Answers

Get information from one files, based on data from other file

Hello. I am trying to get some info from log file. I have fileA , which contains all the country prefixes (the file contains one column and "n" rows ). And i have fileB, which contains huge data of phone numbers (the file contains one column and "n" rows). What i want to do is, to count... (7 Replies)
Discussion started by: dragonfly85
7 Replies

14. Shell Programming and Scripting

How to print last character of hostname and assign to a variable ?

Hi How to pass echo output to a variable ? Does below awk command will get the last character of hostname and assign to a variable - "svr" ? svr=$( echo `hostname` | awk '{print substr($0,length,1)}' ) Thanks. Please use CODE tags when dsplaying code segments, sample input, and sample... (7 Replies)
Discussion started by: Lim
7 Replies

15. Shell Programming and Scripting

Combine first two words ( country name ) into one word in every line of log file with 500 records

United States 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517 Italy 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517 India 1.2.3.4 80 10 1563790914 1 1932454179 1.2.3.6 55517 11.1.2.1 55517 south Africa 1.2.3.4 80 10 1563790914 1... (9 Replies)
Discussion started by: arm
9 Replies