forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeoip.php
210 lines (192 loc) · 6.97 KB
/
geoip.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php
// Start of geoip v.1.0.8
/**
* (PECL geoip >= 0.2.0)<br/>
* Get GeoIP Database information
* @link http://php.net/manual/en/function.geoip-database-info.php
* @param int $database [optional] <p>
* The database type as an integer. You can use the
* various constants defined with
* this extension (ie: GEOIP_*_EDITION).
* </p>
* @return string the corresponding database version, or <b>NULL</b> on error.
*/
function geoip_database_info ($database = GEOIP_COUNTRY_EDITION) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the two letter country code
* @link http://php.net/manual/en/function.geoip-country-code-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose location is to be looked-up.
* </p>
* @return string the two letter ISO country code on success, or <b>FALSE</b>
* if the address cannot be found in the database.
*/
function geoip_country_code_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the three letter country code
* @link http://php.net/manual/en/function.geoip-country-code3-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose location is to be looked-up.
* </p>
* @return string the three letter country code on success, or <b>FALSE</b>
* if the address cannot be found in the database.
*/
function geoip_country_code3_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the full country name
* @link http://php.net/manual/en/function.geoip-country-name-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose location is to be looked-up.
* </p>
* @return string the country name on success, or <b>FALSE</b> if the address cannot
* be found in the database.
*/
function geoip_country_name_by_name ($hostname) {}
/**
* (PECL geoip >= 1.0.3)<br/>
* Get the two letter continent code
* @link http://php.net/manual/en/function.geoip-continent-code-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose location is to be looked-up.
* </p>
* @return string the two letter continent code on success, or <b>FALSE</b> if the
* address cannot be found in the database.
*/
function geoip_continent_code_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the organization name
* @link http://php.net/manual/en/function.geoip-org-by-name.php
* @param string $hostname <p>
* The hostname or IP address.
* </p>
* @return string the organization name on success, or <b>FALSE</b> if the address
* cannot be found in the database.
*/
function geoip_org_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Returns the detailed City information found in the GeoIP Database
* @link http://php.net/manual/en/function.geoip-record-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose record is to be looked-up.
* </p>
* @return array the associative array on success, or <b>FALSE</b> if the address
* cannot be found in the database.
*/
function geoip_record_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the Internet connection type
* @link http://php.net/manual/en/function.geoip-id-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose connection type is to be looked-up.
* </p>
* @return int the connection type.
*/
function geoip_id_by_name ($hostname) {}
/**
* (PECL geoip >= 0.2.0)<br/>
* Get the country code and region
* @link http://php.net/manual/en/function.geoip-region-by-name.php
* @param string $hostname <p>
* The hostname or IP address whose region is to be looked-up.
* </p>
* @return array the associative array on success, or <b>FALSE</b> if the address
* cannot be found in the database.
*/
function geoip_region_by_name ($hostname) {}
/**
* (PECL geoip >= 1.0.2)<br/>
* Get the Internet Service Provider (ISP) name
* @link http://php.net/manual/en/function.geoip-isp-by-name.php
* @param string $hostname <p>
* The hostname or IP address.
* </p>
* @return string the ISP name on success, or <b>FALSE</b> if the address
* cannot be found in the database.
*/
function geoip_isp_by_name ($hostname) {}
/**
* (PECL geoip >= 1.0.1)<br/>
* Determine if GeoIP Database is available
* @link http://php.net/manual/en/function.geoip-db-avail.php
* @param int $database <p>
* The database type as an integer. You can use the
* various constants defined with
* this extension (ie: GEOIP_*_EDITION).
* </p>
* @return bool <b>TRUE</b> is database exists, <b>FALSE</b> if not found, or <b>NULL</b> on error.
*/
function geoip_db_avail ($database) {}
/**
* (PECL geoip >= 1.0.1)<br/>
* Returns detailed information about all GeoIP database types
* @link http://php.net/manual/en/function.geoip-db-get-all-info.php
* @return array the associative array.
*/
function geoip_db_get_all_info () {}
/**
* (PECL geoip >= 1.0.1)<br/>
* Returns the filename of the corresponding GeoIP Database
* @link http://php.net/manual/en/function.geoip-db-filename.php
* @param int $database <p>
* The database type as an integer. You can use the
* various constants defined with
* this extension (ie: GEOIP_*_EDITION).
* </p>
* @return string the filename of the corresponding database, or <b>NULL</b> on error.
*/
function geoip_db_filename ($database) {}
/**
* (PECL geoip >= 1.0.4)<br/>
* Returns the region name for some country and region code combo
* @link http://php.net/manual/en/function.geoip-region-name-by-code.php
* @param string $country_code <p>
* The two-letter country code (see
* <b>geoip_country_code_by_name</b>)
* </p>
* @param string $region_code <p>
* The two-letter (or digit) region code (see
* <b>geoip_region_by_name</b>)
* </p>
* @return string the region name on success, or <b>FALSE</b> if the country and region code
* combo cannot be found.
*/
function geoip_region_name_by_code ($country_code, $region_code) {}
/**
* (PECL geoip >= 1.0.4)<br/>
* Returns the time zone for some country and region code combo
* @link http://php.net/manual/en/function.geoip-time-zone-by-country-and-region.php
* @param string $country_code <p>
* The two-letter country code (see
* <b>geoip_country_code_by_name</b>)
* </p>
* @param string $region_code [optional] <p>
* The two-letter (or digit) region code (see
* <b>geoip_region_by_name</b>)
* </p>
* @return string the time zone on success, or <b>FALSE</b> if the country and region code
* combo cannot be found.
*/
function geoip_time_zone_by_country_and_region ($country_code, $region_code = null) {}
define ('GEOIP_COUNTRY_EDITION', 1);
define ('GEOIP_REGION_EDITION_REV0', 7);
define ('GEOIP_CITY_EDITION_REV0', 6);
define ('GEOIP_ORG_EDITION', 5);
define ('GEOIP_ISP_EDITION', 4);
define ('GEOIP_CITY_EDITION_REV1', 2);
define ('GEOIP_REGION_EDITION_REV1', 3);
define ('GEOIP_PROXY_EDITION', 8);
define ('GEOIP_ASNUM_EDITION', 9);
define ('GEOIP_NETSPEED_EDITION', 10);
define ('GEOIP_DOMAIN_EDITION', 11);
define ('GEOIP_UNKNOWN_SPEED', 0);
define ('GEOIP_DIALUP_SPEED', 1);
define ('GEOIP_CABLEDSL_SPEED', 2);
define ('GEOIP_CORPORATE_SPEED', 3);
// End of geoip v.1.0.8
?>