Tôi đang sử dụng Mamp Pro 1.9.4 trên Mac OSX trong phpinfo[]
Tôi thấy Curl được bật
In phpinfo[]
I see curl is enabled
cURL support enabled
cURL Information 7.20.0
Age 3
Features
AsynchDNS No
Debug No
GSS-Negotiate No
IDN Yes
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO No
SSL Yes
SSPI No
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
Host i386-apple-darwin8.11.1
SSL Version OpenSSL/0.9.7l
ZLib Version 1.2.3
Kịch bản của tôi là mã hóa địa lý dài từ API của Google. Nó hoạt động trực tuyến trên máy chủ nhà cung cấp lưu trữ của tôi nhưng không phải trên localhost .. Tại sao ??
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
Mikko Dot Rantalainen tại Peda Dot Net
Failed to connect[] to host or proxy
Steve tại WebSmithery Dot Co Dot Uk ¶
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
8 năm trước
Joan ¶ — Set an option for a cURL transfer
Gandalf trắng ¶
S.F. ¶[CurlHandle $handle
, int $option
,
mixed $value
]: bool
9 năm trước
ellert at _removeme_ vankoperen dot nl ¶v dot tverdun tại gmail dot com ¶curl_init[].
John Dot David Dot Steele tại Gmail Dot Com ¶11 năm trước
kavih7 tại yahoo dot com ¶obones_remove_me tại miễn phí dot fr ¶
Starosielec tại googlemail dot com ¶bool for the following values of the option
parameter:
6
| Andrabr tại Gmail Dot Com ¶ to automatically set the 8 field in requests where it follows a 9 redirect.
| |
0
| 15 năm trước to mark this as a new cookie "session". It will force libcurl to ignore all cookies it is about to load that are "session cookies" from the previous session. By default, libcurl always stores and loads all cookies, independent if they are session cookies or not. Session cookies are cookies without expiry date and they are meant to be alive and existing for this "session" only. | |
2
| Miloshio tại Gmail Dot Com ¶ to output SSL certification information to 4 on secure transfers.
| w dot danford tại điện tử-software dot com ¶ 5 to be on to have an effect.
|
6
| Puhfesor tại gmail dot com tells the library to perform all the required proxy authentication and connection setup, but no data transfer. This option is implemented for HTTP, SMTP and POP3. | ashooner - - gmail, com ¶ |
8
| Martin K. to convert Unix newlines to CRLF newlines on transfers. | |
0
| Curl có hoạt động trên localhost không? to not allow URLs that include a username. Usernames are allowed by default [0]. | Nó cũng hoạt động cho localhost, vì Curl sẽ kiểm tra bộ đệm trước khi giải quyết nội bộ và giải quyết -giải quyết lưu trữ bộ đệm DNS với các mục đã cho. [Được cung cấp cho các ứng dụng thông qua tùy chọn Curlopt_Resolve.] |
2
| Tôi có thể sử dụng Curl trong PHP không? to shuffle the order of all returned addresses so that they will be used in a random order, when a name is resolved and more than one IP address is returned. This may cause IPv4 to be used before IPv6 or vice versa. | Việc sử dụng Curl trong PHP Curl là tiện ích mở rộng PHP cho phép bạn sử dụng cú pháp URL để nhận và gửi dữ liệu. Curl làm cho nó đơn giản để kết nối giữa các trang web và tên miền khác nhau. Có được một bản sao tài liệu của một trang web. Đệ trình các biểu mẫu tự động, xác thực và sử dụng cookie. |
4
| [Php 4> = 4.0.2, Php 5, Php 7, Php 8] to send an HAProxy PROXY protocol v1 header at the start of the connection. The default action is not to send this header. | Được thêm vào Curl 7.60.0. Có sẵn từ Php 7.3.0. |
6
| 7 để kích hoạt nén SSH tích hợp. Đây là một yêu cầu, không phải là một đơn đặt hàng; Máy chủ có thể hoặc không thể làm điều đó. to enable built-in SSH compression. This is a request, not an order; the server may or may not do it.
| Được thêm vào Curl 7.56.0. Có sẵn từ Php 7.3.0. |
8
| 7 để sử dụng bộ đệm DNS toàn cầu. Tùy chọn này không an toàn cho luồng. Nó được bật theo mặc định nếu PHP được xây dựng để sử dụng không có luồng [CLI, FCGI, Apache2-Prefork, v.v.]. to use a global DNS cache. This option is not thread-safe. It is conditionally enabled by default if PHP is built for non-threaded use [CLI, FCGI, Apache2-Prefork, etc.].
| |
phpinfo[] 0
| 7 Để thất bại một cách xác minh nếu mã HTTP được trả về lớn hơn hoặc bằng 400. Hành vi mặc định là trả về trang bình thường, bỏ qua mã. to fail verbosely if the HTTP code returned is greater than or equal to 400. The default behavior is to return the page normally, ignoring the code.
| |
phpinfo[] 2
| 7 để kích hoạt TLS bắt đầu sai. to enable TLS false start.
| Được thêm vào Curl 7.42.0. Có sẵn kể từ Php 7.0.7. |
phpinfo[] 4
| 7 Để cố gắng truy xuất ngày sửa đổi của tài liệu từ xa. Giá trị này có thể được truy xuất bằng tùy chọn phpinfo[] 6 với Curl_GetInfo []. to attempt to retrieve the modification date of the remote document. This value can be retrieved using the phpinfo[] 6 option with curl_getinfo[].
| |
phpinfo[] 7
| 7 Để làm theo bất kỳ tiêu đề phpinfo[] 9 nào mà máy chủ gửi là một phần của tiêu đề HTTP. Xem thêm $handle 0. to follow any phpinfo[] 9 header that the server sends as part of the HTTP header. See also $handle 0.
| |
$handle 1
| 7 để buộc kết nối đến gần rõ ràng khi nó đã hoàn thành quá trình xử lý và không được gộp lại để tái sử dụng. to force the connection to explicitly close when it has finished processing, and not be pooled for reuse.
| |
$handle 3
| 7 để buộc sử dụng kết nối mới thay vì được lưu trữ trong bộ nhớ cache. to force the use of a new connection instead of a cached one.
| |
$handle 5
| 7 để sử dụng EPRT [và LPRT] khi thực hiện tải xuống FTP hoạt động. Sử dụng $handle 7 để vô hiệu hóa EPRT và LPRT và chỉ sử dụng cổng. to use EPRT [and LPRT] when doing active FTP downloads. Use $handle 7 to disable EPRT and LPRT and use PORT only.
| |
$handle 8
| 7 Trước tiên hãy thử lệnh EPSV để chuyển FTP trước khi quay lại PASV. Đặt thành $handle 7 thành Tắt EPSV. to first try an EPSV command for FTP transfers before reverting back to PASV. Set to $handle 7 to disable EPSV.
| |
$option 1
| 7 Để tạo các thư mục bị thiếu khi một hoạt động FTP gặp phải một đường dẫn hiện không tồn tại. to create missing directories when an FTP operation encounters a path that currently doesn't exist.
| |
$option 3
| 7 để nối vào tệp từ xa thay vì ghi đè lên nó. to append to the remote file instead of overwriting it.
| |
$option 5
| 7 để vô hiệu hóa thuật toán NAGLE của TCP, cố gắng giảm thiểu số lượng gói nhỏ trên mạng. to disable TCP's Nagle algorithm, which tries to minimize the number of small packets on the network.
| Có sẵn cho các phiên bản được biên dịch với LibCurl 7.11.2 trở lên. |
$option 7
| Một bí danh của $option 8. Sử dụng điều đó thay thế.$option 8. Use that instead.
| |
$option 9
| 7 chỉ liệt kê tên của thư mục FTP. to only list the names of an FTP directory.
| |
$value 1
| 7 để bao gồm tiêu đề trong đầu ra. to include the header in the output.
| |
$value 3
| 7 để theo dõi chuỗi yêu cầu của tay cầm. to track the handle's request string.
| Tiền tố $value 5 là cố ý.$value 5 prefix is intentional.
|
$value 6
| Có cho phép phản hồi HTTP/0,9 hay không. Mặc định là $handle 7 kể từ Libcurl 7.66.0; Trước đây nó mặc định là 7.$handle 7 as of libcurl 7.66.0; formerly it defaulted to 7.
| Có sẵn từ Php 7.3.15 và 7.4.3, nếu được xây dựng dựa trên LibCurl> = 7.64.0 |
$value 9
| 7 Để đặt lại phương thức yêu cầu HTTP để nhận. Vì GET là mặc định, điều này chỉ cần thiết nếu phương thức yêu cầu đã được thay đổi. to reset the HTTP request method to GET. Since GET is the default, this is only necessary if the request method has been changed.
| |
handle 1
| 7 đến đường hầm thông qua một proxy HTTP đã cho. to tunnel through a given HTTP proxy.
| |
handle 3
| $handle 7 để có được cơ thể phản hồi HTTP thô. to get the raw HTTP response body.
| Có sẵn nếu được xây dựng chống lại libcurl> = 7.16.2. |
handle 5
| 7 Để tiếp tục gửi thân yêu cầu nếu mã HTTP được trả về bằng hoặc lớn hơn 300. Hành động mặc định sẽ ngừng gửi và đóng luồng hoặc kết nối. Thích hợp cho xác thực NTLM thủ công. Hầu hết các ứng dụng không cần tùy chọn này. to keep sending the request body if the HTTP code returned is equal to or larger than 300. The default action would be to stop sending and close the stream or connection. Suitable for manual NTLM authentication. Most applications do not need this option.
| Có sẵn kể từ Php 7.3.0 nếu được xây dựng dựa trên LibCurl> = 7.51.0. |
handle 7
| 7 hoàn toàn im lặng liên quan đến các chức năng Curl. to be completely silent with regards to the cURL functions.
| Đã xóa trong Curl 7.15.5 [thay vào đó bạn có thể sử dụng Curlopt_returnTransfer] |
handle 9
| 7 Để quét tệp ~/.Netrc để tìm tên người dùng và mật khẩu cho trang web từ xa mà kết nối đang được thiết lập. to scan the ~/.netrc file to find a username and password for the remote site that a connection is being established with.
| |
option 1
| 7 để loại trừ cơ thể khỏi đầu ra. Phương thức yêu cầu sau đó được đặt thành đầu. Thay đổi điều này thành $handle 7 không thay đổi nó để có được. to exclude the body from the output. Request method is then set to HEAD. Changing this to $handle 7 does not change it to GET.
| |
option 4
|
| |
option 7
| 7 Để bỏ qua bất kỳ chức năng Curl nào gây ra tín hiệu được gửi đến quy trình PHP. Điều này được bật theo mặc định trong SAPIS đa luồng để các tùy chọn thời gian chờ vẫn có thể được sử dụng. to ignore any cURL function that causes a signal to be sent to the PHP process. This is turned on by default in multi-threaded SAPIs so timeout options can still be used.
| Được thêm vào Curl 7.10. |
option 9
| 7 Để không xử lý các chuỗi chấm. to not handle dot dot sequences.
| Được thêm vào Curl 7.42.0. Có sẵn kể từ Php 7.0.7. |
01
| 7 Để cố gắng truy xuất ngày sửa đổi của tài liệu từ xa. Giá trị này có thể được truy xuất bằng tùy chọn phpinfo[] 6 với Curl_GetInfo []. to wait for pipelining/multiplexing.
| 7 Để làm theo bất kỳ tiêu đề phpinfo[] 9 nào mà máy chủ gửi là một phần của tiêu đề HTTP. Xem thêm $handle 0. |
03
| 7 để buộc kết nối đến gần rõ ràng khi nó đã hoàn thành quá trình xử lý và không được gộp lại để tái sử dụng. to do a regular HTTP POST. This POST is the normal 05 kind, most commonly used by HTML forms.
| |
06
| 7 để buộc sử dụng kết nối mới thay vì được lưu trữ trong bộ nhớ cache. to HTTP PUT a file. The file to PUT must be set with 08 and 09.
| |
10
| 7 để sử dụng EPRT [và LPRT] khi thực hiện tải xuống FTP hoạt động. Sử dụng $handle 7 để vô hiệu hóa EPRT và LPRT và chỉ sử dụng cổng. to return the transfer as a string of the return value of curl_exec[] instead of outputting it directly.
| |
12
| 7 Trước tiên hãy thử lệnh EPSV để chuyển FTP trước khi quay lại PASV. Đặt thành $handle 7 thành Tắt EPSV. to enable sending the initial response in the first packet.
| 7 Để tạo các thư mục bị thiếu khi một hoạt động FTP gặp phải một đường dẫn hiện không tồn tại. |
14
| $handle 7 để vô hiệu hóa ALPN trong bắt tay SSL [nếu LibCurl phụ trợ SSL được xây dựng để sử dụng hỗ trợ nó], có thể được sử dụng để đàm phán HTTP2. to disable ALPN in the SSL handshake [if the SSL backend libcurl is built to use supports it], which can be used to negotiate http2.
| Được thêm vào Curl 7.36.0. Có sẵn kể từ Php 7.0.7. |
16
| $handle 7 để vô hiệu hóa NPN trong bắt tay SSL [nếu LibCurl phụ trợ SSL được xây dựng để sử dụng hỗ trợ nó], có thể được sử dụng để đàm phán HTTP2. to disable NPN in the SSL handshake [if the SSL backend libcurl is built to use supports it], which can be used to negotiate http2.
| Được thêm vào Curl 7.36.0. Có sẵn kể từ Php 7.0.7. |
18
| $handle 7 để vô hiệu hóa NPN trong bắt tay SSL [nếu LibCurl phụ trợ SSL được xây dựng để sử dụng hỗ trợ nó], có thể được sử dụng để đàm phán HTTP2. to stop cURL from verifying the peer's certificate. Alternate certificates to verify against can be specified with the 20 option or a certificate directory can be specified with the 21 option.
| $handle 7 để ngăn Curl xác minh chứng chỉ ngang hàng. Chứng chỉ thay thế để xác minh có thể được chỉ định với tùy chọn 20 hoặc thư mục chứng chỉ có thể được chỉ định với tùy chọn 21. by default as of cURL 7.10. Default bundle installed as of cURL 7.10.
|
23
| 7 Theo mặc định kể từ Curl 7.10. Gói mặc định được cài đặt như Curl 7.10. to verify the certificate's status.
| 7 để xác minh trạng thái của chứng chỉ. |
25
| Được thêm vào Curl 7.41.0. Có sẵn kể từ Php 7.0.7. to stop cURL from verifying the peer's certificate. Alternate certificates to verify against can be specified with the 20 option or a certificate directory can be specified with the 21 option. When set to false, the peer certificate verification succeeds regardless.
| $handle 7 để ngăn Curl xác minh chứng chỉ ngang hàng. Chứng chỉ thay thế để xác minh có thể được chỉ định với tùy chọn 20 hoặc thư mục chứng chỉ có thể được chỉ định với tùy chọn 21. Khi được đặt thành sai, xác minh chứng chỉ ngang hàng thành công bất kể. by default. Available since PHP 7.3.0 and libcurl >= cURL 7.52.0.
|
30
| 7 Theo mặc định. Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. 7, what disables support for the 32 prefix for uploading files in 33, which means that values starting with 32 can be safely passed as fields. CURLFile may be used for uploads instead.
| |
35
| Luôn luôn 7, những gì vô hiệu hóa hỗ trợ cho tiền tố 32 để tải lên các tệp trong 33, điều đó có nghĩa là các giá trị bắt đầu bằng 32 có thể được truyền một cách an toàn dưới dạng các trường. Curlfile có thể được sử dụng để tải lên thay thế. to suppress proxy CONNECT response headers from the user callback functions 37 and 38, when handle 1 is used and a CONNECT request is made.
| 7 Để triệt tiêu các tiêu đề phản hồi kết nối proxy từ các chức năng gọi lại của người dùng 37 và 38, khi handle 1 được sử dụng và yêu cầu kết nối được thực hiện. |
40
| Được thêm vào Curl 7.54.0. Có sẵn từ Php 7.3.0. to enable TCP Fast Open. | 7 để bật TCP nhanh mở. |
42
| Được thêm vào Curl 7.49.0. Có sẵn kể từ Php 7.0.7. to not send TFTP options requests. | 7 để không gửi các yêu cầu tùy chọn TFTP. |
$option 8
| Được thêm vào Curl 7.48.0. Có sẵn kể từ Php 7.0.7. to use ASCII mode for FTP transfers. For LDAP, it retrieves data in plain text instead of HTML. On Windows systems, it will not set 46 to binary mode.
| |
47
| 7 để sử dụng chế độ ASCII để chuyển FTP. Đối với LDAP, nó lấy dữ liệu bằng văn bản đơn giản thay vì HTML. Trên các hệ thống Windows, nó sẽ không đặt 46 thành chế độ nhị phân. to keep sending the username and password when following locations [using phpinfo[] 7], even when the hostname has changed.
| |
50
| 7 Để tiếp tục gửi tên người dùng và mật khẩu khi các vị trí theo dõi [sử dụng phpinfo[] 7], ngay cả khi tên máy chủ đã thay đổi. to prepare for an upload.
| |
5
| 7 để chuẩn bị cho một tải lên. to output verbose information. Writes output to 4, or the file specified using 55.
|
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
7 Để đầu ra thông tin dài dòng. Ghi đầu ra vào Failed to connect[] to host or proxy
4 hoặc tệp được chỉ định bằng $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
55.int for the following values of the option
parameter:
59
| Ghi chú | Kích thước của bộ đệm để sử dụng cho mỗi lần đọc. Không có gì đảm bảo yêu cầu này sẽ được đáp ứng, tuy nhiên. |
60
| Được thêm vào Curl 7.10. | |
61
| Số giây để chờ trong khi cố gắng kết nối. Sử dụng 0 để đợi vô thời hạn. | Số lượng mili giây để chờ đợi trong khi cố gắng kết nối. Sử dụng 0 để đợi vô thời hạn. Nếu LibCurl được xây dựng để sử dụng trình phân giải tên hệ thống tiêu chuẩn, thì phần kết nối đó vẫn sẽ sử dụng độ phân giải toàn giây cho thời gian chờ với thời gian chờ tối thiểu cho phép một giây. |
62
| Được thêm vào Curl 7.16.2. | |
63
| Số giây để giữ các mục DNS trong bộ nhớ. Tùy chọn này được đặt thành 120 [2 phút] theo mặc định. | Được thêm vào Curl 7.36.0. Có sẵn kể từ Php 7.0.7. |
64
| Thời gian chờ đợi cho kỳ vọng: Phản hồi tiếp tục 100 trong mili giây. Mặc định là 1000 mili giây. | BẮT ĐẦU CHO IPV6 cho thuật toán Happy Eyeballs. Happy Eyeballs cố gắng kết nối với cả địa chỉ IPv4 và IPv6 cho máy chủ ngăn xếp kép, thích IPv6 trước cho thời gian chờ mili giây. Mặc định là Curl_Het_Default, hiện là 200 mili giây. |
65
| Được thêm vào Curl 7.59.0. Có sẵn từ Php 7.3.0. | Phương thức xác thực FTP [khi được kích hoạt]: 66 [thử SSL đầu tiên], 67 [thử TLS đầu tiên] hoặc 68 [hãy quyết định Curl]. |
69
| Được thêm vào Curl 7.12.2. 70: the headers specified in 71 will be used in requests both to servers and proxies. With this option enabled, 72 will not have any effect. 73: makes 71 headers only get sent to a server and not to a proxy. Proxy headers must be set with 72 to get used. Note that if a
non-CONNECT request is sent to a proxy, libcurl will send both server headers and proxy headers. When doing CONNECT, libcurl will send 72 headers only to the proxy and then 71 headers only to the server. Defaults to 73 as of cURL 7.42.1, and 70 before.
| Làm thế nào để đối phó với các tiêu đề. Một trong các hằng số sau: 70: Các tiêu đề được chỉ định trong 71 sẽ được sử dụng trong các yêu cầu cả cho máy chủ và proxy. Với tùy chọn này được bật, 72 sẽ không có bất kỳ hiệu ứng nào. 73: Làm cho các tiêu đề 71 chỉ được gửi đến một máy chủ và không đến một proxy. Tiêu đề proxy phải được đặt với 72 để được sử dụng. Lưu ý rằng nếu yêu cầu không kết nối được gửi đến proxy, LibCurl sẽ gửi cả tiêu đề máy chủ và tiêu đề proxy. Khi kết nối, LibCurl sẽ chỉ gửi các tiêu đề 72 đến proxy và sau đó chỉ các tiêu đề 71 đến máy chủ. Mặc định là 73 kể từ Curl 7.42.1 và 70 trước. |
80
| 81 [mặc định, cho phép Curl quyết định sử dụng phiên bản nào], 82 [Lực lượng http/1.0], 83 [lực lượng http/1.1], 84 [cố gắng . [default, lets CURL decide which version to use], 82 [forces HTTP/1.0], 83 [forces HTTP/1.1], 84 [attempts HTTP 2], 85 [alias of 84], 87 [attempts HTTP 2 over TLS [HTTPS] only] or 88 [issues non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade].
| |
89
| [Các] phương pháp xác thực HTTP để sử dụng. Các tùy chọn là: 90, 91, 92, 93, 94 và 95. 90, 91, 92, 93, 94, and 95. Toán tử bitwise 96 [hoặc] có thể được sử dụng để kết hợp nhiều hơn một phương pháp. Nếu điều này được thực hiện, Curl sẽ thăm dò máy chủ để xem phương pháp nào nó hỗ trợ và chọn phương pháp tốt nhất. 98.
00.
| |
09
| Kích thước dự kiến, tính theo byte, của tệp khi tải tệp lên một trang web từ xa. Lưu ý rằng việc sử dụng tùy chọn này sẽ không ngăn LibCurl gửi thêm dữ liệu, vì chính xác những gì được gửi phụ thuộc vào 02. 02.
| |
03
| Tốc độ chuyển, tính theo byte mỗi giây, việc chuyển nên ở dưới trong số lượng 04 giây trước khi PHP xem xét việc chuyển quá chậm và phá thai. 04 seconds before PHP considers the transfer too slow and aborts.
| |
04
| Số giây tốc độ truyền phải dưới 03 trước khi PHP xem xét việc chuyển quá chậm và hủy bỏ. 03 before PHP considers the transfer too slow and aborts.
| |
07
| Số lượng tối đa của các kết nối liên tục được cho phép. Khi đạt đến giới hạn, cái cũ nhất trong bộ đệm được đóng để ngăn chặn số lượng kết nối mở. | |
$handle 0
| Số lượng tối đa của các chuyển hướng HTTP để làm theo. Sử dụng tùy chọn này cùng với phpinfo[] 7. Giá trị mặc định của 10 được đặt để ngăn chặn chuyển hướng vô hạn. Cài đặt thành 11 cho phép chuyển hướng inifinite và 12 từ chối tất cả các chuyển hướng.phpinfo[] 7. Default value of 10 is set to prevent infinite redirects. Setting to 11 allows inifinite redirects, and 12 refuses all redirects.
| |
13
| Một số cổng khác để kết nối với. | |
14
| Một bitmask 1 [301 đã di chuyển vĩnh viễn], 2 [302 tìm thấy] và 4 [303 xem khác] nếu phương thức bài HTTP nên được duy trì khi phpinfo[] 7 được đặt và một loại chuyển hướng cụ thể xảy ra.phpinfo[] 7 is set and a specific type of redirect occurs.
| Được thêm vào Curl 7.19.1. |
16
| Bitmask của các giá trị 17. Nếu được sử dụng, Bitmask này giới hạn những giao thức mà LibCurl có thể sử dụng trong quá trình chuyển nhượng. Điều này cho phép bạn có một libcurl được xây dựng để hỗ trợ một loạt các giao thức nhưng vẫn giới hạn các chuyển khoản cụ thể chỉ được phép sử dụng một tập hợp con của chúng. Theo mặc định, LibCurl sẽ chấp nhận tất cả các giao thức mà nó hỗ trợ. Xem thêm 18. 17 values. If used, this bitmask limits what protocols libcurl may use in the transfer. This allows you to have a libcurl built to support a wide range of protocols but still limit specific transfers to only be allowed to use a subset of them. By default libcurl will accept all protocols it supports. See also 18. Các tùy chọn giao thức hợp lệ là: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 2 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
| Được thêm vào Curl 7.19.4. |
32
| [Các] phương thức xác thực HTTP để sử dụng cho kết nối proxy. Sử dụng cùng một bitmasks như được mô tả trong 89. Để xác thực proxy, chỉ 90 và 93 hiện đang được hỗ trợ. 89. For proxy authentication, only 90 and 93 are currently supported.
| Được thêm vào Curl 7.10.7. |
36
| Số cổng của proxy để kết nối. Số cổng này cũng có thể được đặt trong 37. 37.
| |
38
| Hoặc 39 [mặc định], 40, 41, 42 hoặc 43. 39 [default], 40, 41, 42 or 43.
| Được thêm vào Curl 7.10. |
18
| Bitmask của các giá trị 17. Nếu được sử dụng, Bitmask này giới hạn những giao thức mà LibCurl có thể sử dụng trong một lần chuyển mà nó tuân theo chuyển hướng khi phpinfo[] 7 được bật. Điều này cho phép bạn giới hạn các chuyển khoản cụ thể chỉ được phép sử dụng một tập hợp con của các giao thức trong chuyển hướng. Theo mặc định, LibCurl sẽ cho phép tất cả các giao thức ngoại trừ Tệp và SCP. Đây là một sự khác biệt so với các phiên bản trước 7.19.4 mà vô điều kiện sẽ theo tất cả các giao thức được hỗ trợ. Xem thêm 16 cho các giá trị không đổi giao thức. 17 values. If used, this bitmask limits what protocols libcurl may use in a transfer that it follows to in a redirect when phpinfo[] 7 is enabled. This allows you to limit specific transfers to only be allowed to use a subset of protocols in redirections. By default libcurl will allow all protocols except for FILE and SCP. This is a difference compared to pre-7.19.4 versions which unconditionally would follow to all protocols supported.
See also 16 for protocol constant values.
| Được thêm vào Curl 7.19.4. |
48
| [Các] phương thức xác thực HTTP để sử dụng cho kết nối proxy. Sử dụng cùng một bitmasks như được mô tả trong 89. Để xác thực proxy, chỉ 90 và 93 hiện đang được hỗ trợ. | |
49
| Được thêm vào Curl 7.10.7. Toán tử bitwise 96 [hoặc] có thể được sử dụng để kết hợp nhiều hơn một phương pháp. Nếu điều này được thực hiện, Curl sẽ thăm dò máy chủ để xem phương pháp nào nó hỗ trợ và chọn phương pháp tốt nhất. Số cổng của proxy để kết nối. Số cổng này cũng có thể được đặt trong Hoặc Được thêm vào Curl 7.10. allows no authentication. Bitmask của các giá trị 17. Nếu được sử dụng, Bitmask này giới hạn những giao thức mà LibCurl có thể sử dụng trong một lần chuyển mà nó tuân theo chuyển hướng khi phpinfo[] 7 được bật. Điều này cho phép bạn giới hạn các chuyển khoản cụ thể chỉ được phép sử dụng một tập hợp con của các giao thức trong chuyển hướng. Theo mặc định, LibCurl sẽ cho phép tất cả các giao thức ngoại trừ Tệp và SCP. Đây là một sự khác biệt so với các phiên bản trước 7.19.4 mà vô điều kiện sẽ theo tất cả các giao thức được hỗ trợ. Xem thêm 16 cho các giá trị không đổi giao thức. 58 option.
| Phần bù, trong byte, để tiếp tục chuyển từ. |
59
| Phương pháp xác thực SOCKS5 để sử dụng. Các tùy chọn là: 90, 51, 52. 60: do not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. 61: disable certificate revocation checks for those SSL backends where such behavior is present.
| Được thêm vào Curl 7.25.0. Có sẵn kể từ Php 7.0.7. |
62
| 63 Để xác minh rằng trường tên chung hoặc trường tên thay thế chủ đề trong chứng chỉ ngang hàng SSL khớp với tên máy chủ được cung cấp. 12 để không kiểm tra tên. 65 không nên được sử dụng. Trong môi trường sản xuất, giá trị của tùy chọn này nên được giữ ở 63 [giá trị mặc định]. | Hỗ trợ giá trị 65 bị xóa trong Curl 7.28.1. |
68
| Một trong 69 [0], 70 [1], 71 [2], 72 [3], 73 [4], 74 [5] hoặc 75 [6]. Phiên bản TLS tối đa có thể được đặt bằng cách sử dụng một trong các hằng số ____276. Cũng có thể hoặc một trong các hằng số 77 với một trong các hằng số 76. 79 [phiên bản tối đa được thư viện hỗ trợ], 80, 81, 82 hoặc 83. 69 [0], 70 [1], 71 [2], 72 [3], 73 [4], 74 [5] or 75 [6]. The maximum TLS version can be set by using one of the 76 constants. It is also possible to OR one of the 77 constants with one of the 76 constants. 79 [the maximum version
supported by the library], 80, 81, 82, or 83.
| |
84
| Đặt các tùy chọn hành vi SSL proxy, là bitmask của bất kỳ hằng số nào sau đây: 60: Không cố gắng sử dụng bất kỳ cách giải quyết nào cho lỗ hổng bảo mật trong giao thức SSL3 và TLS1.0. 61: Vô hiệu hóa kiểm tra thu hồi chứng chỉ cho các phụ trợ SSL đó có hành vi đó. . [Curl> = 7.68.0] 60: do not attempt to use any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. 61: disable certificate revocation checks for those SSL backends where such behavior is present. [curl >= 7.44.0] 87: do not accept "partial" certificate chains, which it otherwise does by default.
[curl >= 7.68.0]
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
88
| Đặt thành 63 để xác minh trong các trường tên chứng chỉ của proxy HTTPS so với tên proxy. Khi được đặt thành 12 kết nối thành công bất kể tên được sử dụng trong chứng chỉ. Sử dụng khả năng đó một cách thận trọng! 65 được coi là một tùy chọn gỡ lỗi trong Curl 7.28.0 trở lên. Từ Curl 7.28.1 đến 7.65.3 92 được trả về. Từ Curl 7.66.0 trở đi 65 và 63 được coi là cùng một giá trị. Trong môi trường sản xuất, giá trị của tùy chọn này nên được giữ ở 63 [giá trị mặc định]. 92 is returned. From curl 7.66.0 onwards 65 and 63 is treated as the same value. In production environments the value of this option should be
kept at 63 [default value].
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
96
| Đặt thành 63 để xác minh trong các trường tên chứng chỉ của proxy HTTPS so với tên proxy. Khi được đặt thành 12 kết nối thành công bất kể tên được sử dụng trong chứng chỉ. Sử dụng khả năng đó một cách thận trọng! 65 được coi là một tùy chọn gỡ lỗi trong Curl 7.28.0 trở lên. Từ Curl 7.28.1 đến 7.65.3 92 được trả về. Từ Curl 7.66.0 trở đi 65 và 63 được coi là cùng một giá trị. Trong môi trường sản xuất, giá trị của tùy chọn này nên được giữ ở 63 [giá trị mặc định]. 69, 70, 73, 74, 75, 02, 79, 80, 81, 82, 83 or 72.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
10
| Đặt thành 63 để xác minh trong các trường tên chứng chỉ của proxy HTTPS so với tên proxy. Khi được đặt thành 12 kết nối thành công bất kể tên được sử dụng trong chứng chỉ. Sử dụng khả năng đó một cách thận trọng! 65 được coi là một tùy chọn gỡ lỗi trong Curl 7.28.0 trở lên. Từ Curl 7.28.1 đến 7.65.3 92 được trả về. Từ Curl 7.66.0 trở đi 65 và 63 được coi là cùng một giá trị. Trong môi trường sản xuất, giá trị của tùy chọn này nên được giữ ở 63 [giá trị mặc định]. | Một trong số 69, 70, 73, 74, 75, 02, 79, 80, 81, 82, 83 hoặc 72. |
11
| Đặt cược tốt nhất của bạn là không đặt điều này và để nó sử dụng mặc định 69 sẽ cố gắng tìm ra phiên bản giao thức SSL từ xa. 13 and 14 options, provided the operating system supports them. If set to 12 [default] keepalive probes are disabled.
| Đặt trọng lượng luồng số [một số từ 1 đến 256]. |
13
| Được thêm vào Curl 7.46.0. Có sẵn kể từ Php 7.0.7. 11 is enabled. Not all operating systems support this option. The default is 18.
| Đặt trọng lượng luồng số [một số từ 1 đến 256]. |
14
| Được thêm vào Curl 7.46.0. Có sẵn kể từ Php 7.0.7. 11 is enabled. Not all operating systems support this option. The default is 18.
| Đặt trọng lượng luồng số [một số từ 1 đến 256]. |
22
| Được thêm vào Curl 7.46.0. Có sẵn kể từ Php 7.0.7. 23 is treated. Use 24 to return the page only if it has been modified since the time specified in 23. If it hasn't been modified, a 26 header will be returned assuming $value 1 is 7. Use 29 for the reverse effect. Use 30 to ignore 23 and always return the page. 30 is the
default.
| Nếu được đặt thành 65, các đầu dò giữ TCP sẽ được gửi. Độ trễ và tần suất của các đầu dò này có thể được kiểm soát bởi các tùy chọn 13 và 14, với điều kiện hệ điều hành hỗ trợ chúng. Nếu được đặt thành 12 [mặc định] Các đầu dò giữ được vô hiệu hóa. 24.
|
34
| Được thêm vào Curl 7.25.0. | |
35
| Đặt độ trễ, trong vài giây, hệ điều hành sẽ đợi trong khi kết nối không hoạt động trước khi gửi các đầu dò giữ, nếu 11 được bật. Không phải tất cả các hệ điều hành đều hỗ trợ tùy chọn này. Mặc định là 18. | Đặt khoảng thời gian, tính bằng giây, hệ điều hành sẽ chờ giữa việc gửi các đầu dò giữ, nếu 11 được bật. Không phải tất cả các hệ điều hành đều hỗ trợ tùy chọn này. Mặc định là 18. |
23
| Làm thế nào 23 được đối xử. Sử dụng 24 để trả về trang chỉ khi nó đã được sửa đổi kể từ thời gian được chỉ định trong 23. Nếu nó chưa được sửa đổi, tiêu đề 26 sẽ được trả về giả định $value 1 là 7. Sử dụng 29 cho hiệu ứng ngược. Sử dụng 30 để bỏ qua 23 và luôn trả về trang. 30 là mặc định. 22.
| |
38
| Trước Curl 7.46.0, mặc định là 24. 22. Defaults to zero. The difference between this option and 23 is the type of the argument. On systems where 'long' is only 32 bit wide, this option has to be used to set dates beyond the year 2038.
| Được thêm vào Curl 7.59.0. Có sẵn từ Php 7.3.0. |
41
| Nếu tải xuống vượt quá tốc độ này [được tính vào byte mỗi giây] trên trung bình tích lũy trong quá trình chuyển, việc chuyển sẽ tạm dừng để giữ cho tốc độ trung bình nhỏ hơn hoặc bằng giá trị tham số. Mặc định cho tốc độ không giới hạn. | Được thêm vào Curl 7.15.5. |
42
| Nếu tải lên vượt quá tốc độ này [được tính vào byte mỗi giây] trên trung bình tích lũy trong quá trình chuyển, việc chuyển sẽ tạm dừng để giữ cho tốc độ trung bình nhỏ hơn hoặc bằng giá trị tham số. Mặc định cho tốc độ không giới hạn. | Được thêm vào Curl 7.15.5. |
43
| Nếu tải lên vượt quá tốc độ này [được tính vào byte mỗi giây] trên trung bình tích lũy trong quá trình chuyển, việc chuyển sẽ tạm dừng để giữ cho tốc độ trung bình nhỏ hơn hoặc bằng giá trị tham số. Mặc định cho tốc độ không giới hạn. 44, 45, 46, 47. Set to 48 to let libcurl pick one.
| Một bitmask bao gồm một hoặc nhiều 44, 45, 46, 47. Đặt thành 48 để Libcurl chọn một. |
49
| Được thêm vào Curl 7.16.1. 50, 51, 52, by default 50.
| Cho phép một ứng dụng chọn loại địa chỉ IP sẽ sử dụng khi giải quyết tên máy chủ. Điều này chỉ thú vị khi sử dụng tên máy chủ giải quyết địa chỉ bằng nhiều phiên bản IP, các giá trị có thể là 50, 51, 52, theo mặc định 50. |
54
| Được thêm vào Curl 7.10.8. 55, 56 and 57.
| Cho Curl sử dụng phương thức nào để tiếp cận tệp trên máy chủ FTP [S]. Các giá trị có thể là 55, 56 và 57. |
Được thêm vào Curl 7.15.1.string for the following values of the option
parameter:
61
| Ghi chústring. This option shares the same semantics as 62. These two options share the same storage and therefore only one of them can be set per handle.
| Cho phép sử dụng ổ cắm miền UNIX trừu tượng thay vì thiết lập kết nối TCP thành máy chủ và đặt đường dẫn đến chuỗi đã cho. Tùy chọn này có chung ngữ nghĩa với 62. Hai tùy chọn này có chung lưu trữ và do đó chỉ có một trong số chúng có thể được đặt cho mỗi tay cầm. |
20
| Có sẵn kể từ Php 7.3.0 và Curl 7.53.0 18.
| Tên của một tệp giữ một hoặc nhiều chứng chỉ để xác minh ngang hàng. Điều này chỉ có ý nghĩa khi được sử dụng kết hợp với 18. |
21
| Có thể yêu cầu một con đường tuyệt đối. 18.
| |
67
| Một thư mục chứa nhiều chứng chỉ CA. Sử dụng tùy chọn này cùng với 18. | |
70
| Nội dung của tiêu đề 68 sẽ được sử dụng trong yêu cầu HTTP. Lưu ý rằng nhiều cookie được phân tách bằng dấu chấm phẩy theo sau là một không gian [ví dụ: " 69"] | |
71
| Tên của tệp chứa dữ liệu cookie. Tệp cookie có thể ở định dạng NetScape hoặc chỉ các tiêu đề kiểu HTTP đơn giản được đổ vào một tệp. Nếu tên là một chuỗi trống, không có cookie nào được tải, nhưng xử lý cookie vẫn được bật. | |
72
| Tên của một tệp để lưu tất cả các cookie nội bộ vào khi tay cầm được đóng, ví dụ: Sau khi gọi đến Curl_close. 71. 77 loads all cookies from the files specified by 70.
| Một chuỗi cookie [tức là một dòng duy nhất ở định dạng Netscape/Mozilla hoặc tiêu đề đặt cookie kiểu HTTP thông thường] thêm cookie duy nhất vào cửa hàng cookie nội bộ. 73 xóa tất cả các cookie được giữ trong bộ nhớ. 74 xóa tất cả các cookie phiên được giữ trong bộ nhớ. 75 viết tất cả các cookie đã biết vào tệp được chỉ định bởi 71. 77 Tải tất cả cookie từ các tệp được chỉ định bởi 70. |
79
| Có sẵn kể từ Curl 7.14.1.
| |
87
| Đừng làm điều này mà không đảm bảo máy chủ hỗ trợ phương thức yêu cầu tùy chỉnh trước. | Giao thức mặc định để sử dụng nếu URL bị thiếu tên sơ đồ. |
88
| Được thêm vào Curl 7.45.0. Có sẵn kể từ Php 7.0.7. | Đặt tên của giao diện mạng mà bộ giải quyết DNS sẽ liên kết. Đây phải là một tên giao diện [không phải là một địa chỉ]. |
89
| Được thêm vào Curl 7.33.0. Có sẵn kể từ Php 7.0.7. | Đặt tên của giao diện mạng mà bộ giải quyết DNS sẽ liên kết. Đây phải là một tên giao diện [không phải là một địa chỉ]. |
90
| Được thêm vào Curl 7.33.0. Có sẵn kể từ Php 7.0.7. | Đặt tên của giao diện mạng mà bộ giải quyết DNS sẽ liên kết. Đây phải là một tên giao diện [không phải là một địa chỉ]. |
91
| Được thêm vào Curl 7.33.0. Có sẵn kể từ Php 7.0.7. 92, except a filename to an Entropy Gathering Daemon socket.
| |
93
| Đặt địa chỉ IPv4 cục bộ mà bộ phân giải nên liên kết. Đối số phải chứa một địa chỉ IPv4 số duy nhất dưới dạng chuỗi. | Đặt địa chỉ IPv6 cục bộ mà bộ phân giải nên liên kết. Đối số phải chứa một địa chỉ IPv6 số duy nhất dưới dạng chuỗi. |
99
| Giá trị sẽ được sử dụng để lấy địa chỉ IP sử dụng cho lệnh "Cổng" FTP. Lệnh "cổng" cho máy chủ từ xa kết nối với địa chỉ IP được chỉ định của chúng tôi. Chuỗi có thể là một địa chỉ IP đơn giản, tên máy chủ, tên giao diện mạng [trong Unix] hoặc chỉ là một đơn giản '-' để sử dụng địa chỉ IP mặc định của hệ thống. | |
phpinfo[] 00
| Tên của giao diện mạng đi để sử dụng. Đây có thể là một tên giao diện, địa chỉ IP hoặc tên máy chủ. | |
phpinfo[] 01
| Mật khẩu cần thiết để sử dụng khóa riêng phpinfo[] 02 hoặc phpinfo[] 03.phpinfo[] 02 or phpinfo[] 03 private key.
| Được thêm vào Curl 7.16.1. |
phpinfo[] 04
| Mức bảo mật KRB4 [Kerberos 4]. Bất kỳ giá trị nào sau đây [theo thứ tự ít nhất đến mạnh nhất] đều hợp lệ: phpinfo[] 05, phpinfo[] 06, phpinfo[] 07, phpinfo[] 08. Nếu chuỗi không khớp với một trong số này, phpinfo[] 09 sẽ được sử dụng. Đặt tùy chọn này thành phpinfo[] 10 sẽ vô hiệu hóa bảo mật KRB4. Hiện tại Krb4 Security chỉ hoạt động với các giao dịch FTP.phpinfo[] 10 will disable KRB4 security. Currently KRB4 security only works with FTP transactions.
| |
phpinfo[] 11
| Có thể được sử dụng để đặt các tùy chọn đăng nhập cụ thể của giao thức, chẳng hạn như cơ chế xác thực ưa thích thông qua "Auth = ntlm" hoặc "auth =*" và nên được sử dụng cùng với tùy chọn phpinfo[] 12.phpinfo[] 12 option.
| Được thêm vào Curl 7.34.0. Có sẵn kể từ Php 7.0.7. |
phpinfo[] 13
| Đặt khóa công khai được ghim. Chuỗi có thể là tên tệp của khóa công khai được ghim của bạn. Định dạng tệp dự kiến là "PEM" hoặc "DER". Chuỗi cũng có thể là bất kỳ số lượng băm SHA256 được mã hóa Base64 trước "SHA256 //" và được phân tách bằng ";". | Được thêm vào Curl 7.39.0. Có sẵn kể từ Php 7.0.7. |
33
| Dữ liệu đầy đủ để đăng trong hoạt động "đăng" HTTP. Tham số này có thể được truyền dưới dạng chuỗi được mã hóa URLENCOD như 'phpinfo[] 15' hoặc dưới dạng mảng có tên trường là dữ liệu khóa và trường là giá trị. Nếu 1 là một mảng, tiêu đề phpinfo[] 17 sẽ được đặt thành phpinfo[] 18. Các tệp có thể được gửi bằng Curlfile hoặc CurlStringFile, trong trường hợp đó 1 phải là một mảng. Files can be sent using CURLFile or
CURLStringFile, in which case 1 must be an array.
| |
phpinfo[] 20
| Bất kỳ dữ liệu nên được liên kết với tay cầm Curl này. Dữ liệu này sau đó có thể được truy xuất với tùy chọn phpinfo[] 21 của curl_getInfo []. Curl không làm gì với dữ liệu này. Khi sử dụng tay cầm Curl Multi, dữ liệu riêng tư này thường là một khóa duy nhất để xác định tay cầm Curl tiêu chuẩn.phpinfo[] 21 option of curl_getinfo[]. cURL does nothing with this data. When using a cURL multi handle, this private data is typically a unique key to identify a standard cURL handle.
| Được thêm vào Curl 7.10.3. |
phpinfo[] 22
| Đặt một chuỗi giữ tên máy chủ hoặc địa chỉ IP số chấm để được sử dụng làm preproxy có kết nối với trước khi kết nối với proxy HTTP [s] được chỉ định trong tùy chọn 37 cho yêu cầu sắp tới. Preproxy chỉ có thể là một proxy vớ và nó phải được đặt trước với phpinfo[] 24 để chỉ định loại vớ nào được sử dụng. Một địa chỉ IPv6 số phải được viết trong [dấu ngoặc]. Đặt preproxy thành một chuỗi trống vô hiệu hóa rõ ràng việc sử dụng preproxy. Để chỉ định số cổng trong chuỗi này, hãy nối phpinfo[] 25 vào cuối tên máy chủ. Số cổng của proxy có thể tùy ý được chỉ định với tùy chọn riêng 36. Mặc định sử dụng cổng 1080 cho proxy nếu một cổng không được chỉ định.string holding the host name or dotted numerical IP address to be used as the preproxy that curl connects to before it connects to the HTTP[S] proxy specified in the 37 option for the upcoming request. The preproxy can only be a SOCKS proxy and it should be prefixed with phpinfo[] 24 to specify which kind of socks is used. A numerical IPv6 address must be written within [brackets]. Setting the preproxy to an empty string explicitly disables the use
of a preproxy. To specify port number in this string, append phpinfo[] 25 to the end of the host name. The proxy's port number may optionally be specified with the separate option 36. Defaults to using port 1080 for proxies if a port is not specified.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
37
| Proxy HTTP cho các yêu cầu đường hầm thông qua. | |
phpinfo[] 28
| Tên dịch vụ xác thực proxy. | Được thêm vào Curl 7.43.0 cho các proxy HTTP và trong Curl 7.49.0 cho các proxy SOCKS5. Có sẵn kể từ Php 7.0.7. |
phpinfo[] 29
| Đường dẫn đến gói chứng chỉ proxy [CA]. Đặt đường dẫn dưới dạng chuỗi đặt tên một tệp giữ một hoặc nhiều chứng chỉ để xác minh proxy HTTPS. Tùy chọn này là để kết nối với proxy HTTPS chứ không phải máy chủ HTTPS. Các mặc định được đặt thành đường dẫn hệ thống trong đó gói cacert của LibCurl được coi là được lưu trữ.string naming a file holding one or more certificates to verify the HTTPS proxy with. This option is for connecting to an HTTPS proxy, not an HTTPS server. Defaults set to the system path where libcurl's cacert bundle is assumed to be stored. | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 30
| Proxy HTTP cho các yêu cầu đường hầm thông qua. | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 31
| Proxy HTTP cho các yêu cầu đường hầm thông qua. | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 32
| Proxy HTTP cho các yêu cầu đường hầm thông qua.phpinfo[] 33 private key. You never needed a passphrase to load a certificate but you need one to load your private key. This option is for connecting to an HTTPS proxy, not an HTTPS server.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 34
| Proxy HTTP cho các yêu cầu đường hầm thông qua. | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 35
| Tên tệp của chứng chỉ máy khách của bạn được sử dụng để kết nối với proxy HTTPS. Định dạng mặc định là "p12" trên vận chuyển an toàn và "PEM" trên các công cụ khác và có thể được thay đổi với phpinfo[] 36. Với NSS hoặc vận chuyển an toàn, đây cũng có thể là biệt danh của chứng chỉ bạn muốn xác thực với nó được đặt tên trong cơ sở dữ liệu bảo mật. Nếu bạn muốn sử dụng một tệp từ thư mục hiện tại, vui lòng đi trước nó với tiền tố "./", để tránh nhầm lẫn với một biệt danh.phpinfo[] 36. With NSS or Secure Transport, this can also be the nickname of the certificate you wish to authenticate with as it is named in the security database. If you want to use a file from the current directory, please precede it with "./" prefix, in order to avoid confusion with a nickname.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 36
| Định dạng chứng chỉ máy khách của bạn được sử dụng khi kết nối với proxy HTTPS. Các định dạng được hỗ trợ là "PEM" và "DER", ngoại trừ với vận chuyển an toàn. OpenSSL [phiên bản 0.9.3 trở lên] và vận chuyển an toàn [trên iOS 5 trở lên hoặc OS X 10.7 trở lên] cũng hỗ trợ "P12" cho các tệp được mã hóa PKCs#12. Mặc định là "PEM". | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 38
| Danh sách các mật mã để sử dụng cho kết nối với proxy HTTPS. Danh sách phải đúng về mặt cú pháp, nó bao gồm một hoặc nhiều chuỗi mật mã được phân tách bởi các dấu chấm. Dấu phẩy hoặc không gian cũng là các thiết bị phân cách chấp nhận được nhưng các đại phân thường được sử dụng,!, - và + có thể được sử dụng làm toán tử. | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 39
| Danh sách các bộ mật mã để sử dụng cho kết nối TLS 1.3 với proxy. Danh sách phải đúng về mặt cú pháp, nó bao gồm một hoặc nhiều chuỗi bộ mật mã được phân tách bởi các dấu chấm. Tùy chọn này hiện chỉ được sử dụng khi Curl được xây dựng để sử dụng OpenSSL 1.1.1 trở lên. Nếu bạn đang sử dụng một phụ trợ SSL khác, bạn có thể thử cài đặt các bộ mật mã TLS 1.3 bằng cách sử dụng tùy chọn phpinfo[] 38.phpinfo[] 38 option.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.61.0. Có sẵn khi được xây dựng với OpenSSL> = 1.1.1. |
phpinfo[] 33
| Tên tệp của khóa riêng của bạn được sử dụng để kết nối với proxy HTTPS. Định dạng mặc định là "PEM" và có thể được thay đổi với phpinfo[] 42. .phpinfo[] 42. [iOS and Mac OS X only] This option is ignored if curl was built against Secure Transport.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. Có sẵn nếu được xây dựng TLS được bật. |
phpinfo[] 42
| Định dạng của khóa riêng của bạn. Các định dạng được hỗ trợ là "PEM", "DER" và "Eng". | Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 44
| Mật khẩu để sử dụng cho phương thức xác thực TLS được chỉ định với tùy chọn phpinfo[] 45. Yêu cầu tùy chọn phpinfo[] 46 cũng được đặt.phpinfo[] 45 option. Requires that the phpinfo[] 46 option to also be set.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 45
| Phương pháp xác thực TLS được sử dụng cho kết nối HTTPS. Phương pháp được hỗ trợ là "SRP".
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
phpinfo[] 46
| Tên người dùng để sử dụng cho phương thức xác thực proxy TLS của HTTPS được chỉ định với tùy chọn phpinfo[] 45. Yêu cầu tùy chọn phpinfo[] 44 cũng được đặt.phpinfo[] 45 option. Requires that the phpinfo[] 44 option to also be set.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.52.0. |
58
| Tên người dùng và mật khẩu được định dạng là phpinfo[] 54 để sử dụng cho kết nối với proxy. | |
92
| Một tên tệp được sử dụng để gieo vào trình tạo số ngẫu nhiên cho SSL. | |
phpinfo[] 56
| Phạm vi dữ liệu để truy xuất theo định dạng phpinfo[] 57 trong đó x hoặc y là tùy chọn. Chuyển khoản HTTP cũng hỗ trợ một số khoảng, được phân tách bằng dấu phẩy ở định dạng phpinfo[] 58. | |
phpinfo[] 59
| Nội dung của tiêu đề phpinfo[] 60 sẽ được sử dụng trong yêu cầu HTTP. | |
phpinfo[] 61
| Tên dịch vụ xác thực. | Được thêm vào Curl 7.43.0. Có sẵn kể từ Php 7.0.7. |
phpinfo[] 62
| Một chuỗi chứa 32 chữ số thập lục phân. Chuỗi phải là tổng kiểm tra MD5 của khóa công khai của máy chủ từ xa và LibCurl sẽ từ chối kết nối với máy chủ trừ khi MD5sums khớp. Tùy chọn này chỉ dành cho chuyển SCP và SFTP. | Được thêm vào Curl 7.17.1. |
phpinfo[] 63
| Tên tệp cho khóa công khai của bạn. Nếu không được sử dụng, libcurl mặc định là $ home/.ssh/id_dsa.pub nếu biến môi trường gia đình được đặt và chỉ "id_dsa.pub" trong thư mục hiện tại nếu home không được đặt. | Được thêm vào Curl 7.16.1. |
phpinfo[] 03
| Tên tệp cho khóa riêng của bạn. Nếu không được sử dụng, libcurl mặc định là $ home/.ssh/id_dsa nếu biến môi trường gia đình được đặt và chỉ "id_dsa" trong thư mục hiện tại nếu nhà không được đặt. Nếu tệp được bảo vệ bằng mật khẩu, hãy đặt mật khẩu với phpinfo[] 01.phpinfo[] 01.
| Được thêm vào Curl 7.16.1. |
phpinfo[] 66
| Tên tệp cho khóa riêng của bạn. Nếu không được sử dụng, libcurl mặc định là $ home/.ssh/id_dsa nếu biến môi trường gia đình được đặt và chỉ "id_dsa" trong thư mục hiện tại nếu nhà không được đặt. Nếu tệp được bảo vệ bằng mật khẩu, hãy đặt mật khẩu với phpinfo[] 01. | |
phpinfo[] 69
| Tên của một tệp chứa chứng chỉ được định dạng PEM. | |
phpinfo[] 70
| Mật khẩu cần thiết để sử dụng chứng chỉ phpinfo[] 69.phpinfo[] 69 certificate.
| |
phpinfo[] 72
| Định dạng của chứng chỉ. Các định dạng được hỗ trợ là phpinfo[] 73 [mặc định], phpinfo[] 74 và phpinfo[] 75. Kể từ OpenSSL 0.9.3, phpinfo[] 76 [đối với các tệp được mã hóa PKCS#12] cũng được hỗ trợ. | Được thêm vào Curl 7.9.3. |
phpinfo[] 77
| Mã định danh cho động cơ tiền điện tử của khóa SSL riêng được chỉ định trong phpinfo[] 02.phpinfo[] 02.
| |
phpinfo[] 79
| Mã định danh cho động cơ tiền điện tử được sử dụng cho các hoạt động tiền điện tử không đối xứng. | |
phpinfo[] 02
| Tên của một tệp chứa khóa SSL riêng. | |
phpinfo[] 81
| Mật khẩu bí mật cần thiết để sử dụng khóa SSL riêng được chỉ định trong
| |
phpinfo[] 83
| Loại khóa của khóa SSL riêng được chỉ định trong phpinfo[] 02. Các loại khóa được hỗ trợ là phpinfo[] 73 [mặc định], phpinfo[] 74 và phpinfo[] 75.phpinfo[] 02. Supported key types are phpinfo[] 73 [default], phpinfo[] 74, and phpinfo[] 75.
| |
phpinfo[] 88
| Danh sách các bộ mật mã để sử dụng cho kết nối TLS 1.3. Danh sách phải đúng về mặt cú pháp, nó bao gồm một hoặc nhiều chuỗi bộ mật mã được phân tách bởi các dấu chấm. Tùy chọn này hiện chỉ được sử dụng khi Curl được xây dựng để sử dụng OpenSSL 1.1.1 trở lên. Nếu bạn đang sử dụng một phụ trợ SSL khác, bạn có thể thử cài đặt các bộ mật mã TLS 1.3 bằng cách sử dụng tùy chọn phpinfo[] 66.phpinfo[] 66 option.
| Có sẵn kể từ Php 7.3.0 và libcurl> = Curl 7.61.0. Có sẵn khi được xây dựng với OpenSSL> = 1.1.1. |
62
| Cho phép sử dụng ổ cắm miền Unix làm điểm cuối kết nối và đặt đường dẫn đến chuỗi đã cho.string. | Được thêm vào Curl 7.40.0. Có sẵn kể từ Php 7.0.7. |
phpinfo[] 91
| URL để lấy. Điều này cũng có thể được đặt khi khởi tạo một phiên với curl_init [].curl_init[]. | |
phpinfo[] 92
| Nội dung của tiêu đề phpinfo[] 93 sẽ được sử dụng trong yêu cầu HTTP. | |
phpinfo[] 12
| Tên người dùng để sử dụng trong xác thực. | Được thêm vào Curl 7.19.1. |
phpinfo[] 95
| Mật khẩu để sử dụng trong xác thực. | Được thêm vào Curl 7.19.1. |
phpinfo[] 96
| Mật khẩu để sử dụng trong xác thực. | |
phpinfo[] 98
| Tên người dùng và mật khẩu được định dạng là phpinfo[] 54 để sử dụng cho kết nối. | Chỉ định mã thông báo truy cập OAuth 2.0. |
Được thêm vào Curl 7.33.0. Có sẵn kể từ Php 7.0.7.
$handle 02
| Ghi chú | Kết nối với một máy chủ và cổng cụ thể thay vì máy chủ và cổng của URL. Chấp nhận một loạt các chuỗi với định dạng $handle 03. |
$handle 04
| Được thêm vào Curl 7.49.0. Có sẵn kể từ Php 7.0.7. | Một mảng các phản hồi HTTP 200 sẽ được coi là phản hồi hợp lệ và không phải là lỗi. |
71
| Được thêm vào Curl 7.10.3. | |
$handle 07
| Một mảng các trường tiêu đề HTTP để đặt, ở định dạng $handle 06 | |
72
| Một mảng các lệnh FTP để thực thi trên máy chủ sau khi yêu cầu FTP được thực hiện. | Một mảng các tiêu đề HTTP tùy chỉnh để chuyển đến proxy. |
$handle 09
| Được thêm vào Curl 7.37.0. Có sẵn kể từ Php 7.0.7. | |
$handle 10
| Một mảng các lệnh FTP để thực thi trên máy chủ trước yêu cầu FTP. | Cung cấp một địa chỉ tùy chỉnh cho một cặp máy chủ và cổng cụ thể. Một mảng của chuỗi địa chỉ máy chủ, cổng và địa chỉ IP, mỗi phần tử được phân tách bằng một dấu hai chấm. Trong định dạng: $handle 11 |
Được thêm vào trong Curl 7.21.3.fopen[], for example] for the following values of the option
parameter:
$handle 15
| Đặt 1 thành |
08
| Ghi chú |
55
| Kết nối với một máy chủ và cổng cụ thể thay vì máy chủ và cổng của URL. Chấp nhận một loạt các chuỗi với định dạng $handle 03. |
$handle 20
| Được thêm vào Curl 7.49.0. Có sẵn kể từ Php 7.0.7. |
Một mảng các phản hồi HTTP 200 sẽ được coi là phản hồi hợp lệ và không phải là lỗi.
37
| Ghi chú | Kết nối với một máy chủ và cổng cụ thể thay vì máy chủ và cổng của URL. Chấp nhận một loạt các chuỗi với định dạng $handle 03. |
$handle 25
| Được thêm vào Curl 7.49.0. Có sẵn kể từ Php 7.0.7. | Một mảng các phản hồi HTTP 200 sẽ được coi là phản hồi hợp lệ và không phải là lỗi. |
$handle 26
| Được thêm vào Curl 7.10.3.
Trả về một giá trị khác không để hủy bỏ việc chuyển nhượng. Trong trường hợp đó, việc chuyển sẽ đặt lỗi | & nbsp; |
02
| Một cuộc gọi lại chấp nhận ba tham số. Đầu tiên là tài nguyên Curl, thứ hai là tài nguyên luồng được cung cấp để uốn cong thông qua tùy chọn 08 và thứ ba là lượng dữ liệu tối đa cần đọc. Cuộc gọi lại phải trả về một chuỗi có độ dài bằng hoặc nhỏ hơn lượng dữ liệu được yêu cầu, thường bằng cách đọc nó từ tài nguyên luồng được truyền. Nó sẽ trả về một chuỗi trống cho tín hiệu $handle 32. 08, and the third is the maximum amount of data to be read. The callback must return a string with a length equal or smaller than the amount of data requested, typically by reading it from the passed stream resource. It should return an empty string to signal $handle 32.
| & nbsp; |
38
| Một cuộc gọi lại chấp nhận ba tham số. Đầu tiên là tài nguyên Curl, thứ hai là tài nguyên luồng được cung cấp để uốn cong thông qua tùy chọn 08 và thứ ba là lượng dữ liệu tối đa cần đọc. Cuộc gọi lại phải trả về một chuỗi có độ dài bằng hoặc nhỏ hơn lượng dữ liệu được yêu cầu, thường bằng cách đọc nó từ tài nguyên luồng được truyền. Nó sẽ trả về một chuỗi trống cho tín hiệu $handle 32. | & nbsp; |
$handle 34
| Một cuộc gọi lại chấp nhận ba tham số. Đầu tiên là tài nguyên Curl, thứ hai là tài nguyên luồng được cung cấp để uốn cong thông qua tùy chọn 08 và thứ ba là lượng dữ liệu tối đa cần đọc. Cuộc gọi lại phải trả về một chuỗi có độ dài bằng hoặc nhỏ hơn lượng dữ liệu được yêu cầu, thường bằng cách đọc nó từ tài nguyên luồng được truyền. Nó sẽ trả về một chuỗi trống cho tín hiệu $handle 32.$handle 26 but is more modern and the preferred option from cURL.
| Một cuộc gọi lại chấp nhận hai tham số. Đầu tiên là tài nguyên Curl và thứ hai là một chuỗi có dữ liệu được viết. Dữ liệu phải được lưu bởi cuộc gọi lại này. Nó phải trả về số lượng chính xác của byte được viết hoặc chuyển sẽ bị hủy bỏ với một lỗi. |
Một cuộc gọi lại chấp nhận hai tham số. Có mục đích tương tự như $handle
26 nhưng hiện đại hơn và tùy chọn ưa thích từ Curl.
$handle 37
| Quyền muacurl_share_init[]. Makes the cURL handle to use the data from the shared handle. |
Đặt $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
1 thành
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
Kết quả của Curl_Share_init []. Làm cho tay cầm Curl để sử dụng dữ liệu từ tay cầm được chia sẻ.
7 on success or $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
$handle
7 on failure.
Trả về giá trị
8.0.0 | Phiên bảnCurlHandle instance now; previously, a resource was expected. |
Sự mô tả | handle mong đợi một trường hợp curlhandle bây giờ; Trước đây, một tài nguyên đã được dự kiến.$value 6.
|
7.3.0 | 7.3.15, 7.4.3 61, handle 5, phpinfo[] 22, phpinfo[] 29, phpinfo[] 30, phpinfo[] 31, phpinfo[] 32, phpinfo[] 34, phpinfo[] 35, phpinfo[] 36, phpinfo[] 38, phpinfo[] 33, phpinfo[] 42, 84, 88, 25, 96,
phpinfo[] 44, phpinfo[] 45, phpinfo[] 46, 49, 35, 0, 2, 64, 4, phpinfo[] 39, 6, 38 and phpinfo[] 88.
|
7.0.7 | Giới thiệu $value 6.$handle 72, 88, 87, $handle 75, $handle 76, $handle 77, $handle 78, $handle 79, $handle 80, $handle 81, $handle 82, $handle 83, $handle 84, $handle 85, $handle 86, 73, 70,
$handle 89, $handle 90, $handle 91, $handle 92, $handle 93, $handle 02, 87, 88, 89, 90, 63, 69, phpinfo[] 11, option 9, phpinfo[] 13, 01, phpinfo[] 28,
72, 12, phpinfo[] 61, 14, 16, phpinfo[] 2, 23, 10, 40, 42, 62, phpinfo[] 98, $option 18, $option 19, $option 20, $option 21 and 61.
|
Introduced $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
61, handle
5, phpinfo[]
22, phpinfo[]
29, phpinfo[]
30, phpinfo[]
31, phpinfo[]
32, phpinfo[]
34, phpinfo[]
35, phpinfo[]
36, phpinfo[]
38, phpinfo[]
33, phpinfo[]
42, Failed to connect[] to host or proxy
84, Failed to connect[] to host or proxy
88, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
25, Failed to connect[] to host or proxy
96, phpinfo[]
44, phpinfo[]
45, phpinfo[]
46, Failed to connect[] to host or proxy
49, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
35, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
0, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
2, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
64 , $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
4, phpinfo[]
39, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
6, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
38 và phpinfo[]
88.
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
Failed to connect[] to host or proxy
Failed to connect[] to host or proxy
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
Failed to connect[] to host or proxy
Failed to connect[] to host or proxy
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
$ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
Introduced $handle
72,
88, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
87, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
$handle
75, $handle
76, $handle
77, $handle
78, $handle
79, $handle
80, $handle
81, $handle
82, $handle
83, $handle
84, $handle
85, $handle
86,
73, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
70, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
$handle
89, $handle
90, $handle
91, $handle
92, $handle
93, $handle
02,
87, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
88 , $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
89, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
90, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
63, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
69, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
phpinfo[]
11, option
9, phpinfo[]
13,
01, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
phpinfo[]
28,
72, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
12, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
phpinfo[]
61,
14, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
16, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
phpinfo[]
2,
23, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
10, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
40, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
42, $latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
62, $ch = curl_init[];
curl_setopt[$ch, CURLOPT_URL, $url];
curl_setopt[$ch, CURLOPT_POST, 1];
curl_setopt[$ch, CURLOPT_POSTFIELDS, $params];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, true];
curl_setopt[$ch, CURLOPT_HTTPHEADER, $headers];
$output = curl_exec[$ch];
echo "Error = " . curl_errno[$ch] . "
";
curl_close[$ch];
echo "Output = " . $output . "
";
phpinfo[]
98, $option
18, $option
19, $option
20, $option
21 và
61.Failed to connect[] to host or proxy
$option
23
Ví dụ
Ghi chú::
Ví dụ #1 Khởi tạo phiên Curl mới và tìm nạp trang web
33 will encode the data as multipart/form-data, while passing a URL-encoded string will encode the data as application/x-www-form-urlencoded.$latlng = "44.3585230889,8.57745766643"; $lang = "it"; $geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang"; $ch = curl_init[$geocodeURL]; curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1]; $result = curl_exec[$ch]; $httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE]; curl_close[$ch]; if [$httpCode == 200] { $geocode = json_decode[$result]; $location = $geocode->results[0]->address_components[0]->long_name; $city = $geocode->results[0]->address_components[1]->long_name; $province = $geocode->results[0]->address_components[2]->long_name; $region = $geocode->results[0]->address_components[3]->long_name; $country = $geocode->results[0]->address_components[4]->long_name; $geo_status = $geocode->status; $geo_str = "$location, $city, $province, $region, $country"; } else { $geo_status = "HTTP_FAIL_$httpCode"; $geo_str = "Failed: $geo_status"; }
Ghi chú
- Chuyển một mảng cho
33 sẽ mã hóa dữ liệu dưới dạng dữ liệu đa dạng/hình thức, trong khi truyền một chuỗi được mã hóa URL sẽ mã hóa dữ liệu dưới dạng ứng dụng/X-www-form-urlencoded.$latlng = "44.3585230889,8.57745766643"; $lang = "it"; $geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang"; $ch = curl_init[$geocodeURL]; curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1]; $result = curl_exec[$ch]; $httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE]; curl_close[$ch]; if [$httpCode == 200] { $geocode = json_decode[$result]; $location = $geocode->results[0]->address_components[0]->long_name; $city = $geocode->results[0]->address_components[1]->long_name; $province = $geocode->results[0]->address_components[2]->long_name; $region = $geocode->results[0]->address_components[3]->long_name; $country = $geocode->results[0]->address_components[4]->long_name; $geo_status = $geocode->status; $geo_str = "$location, $city, $province, $region, $country"; } else { $geo_status = "HTTP_FAIL_$httpCode"; $geo_str = "Failed: $geo_status"; }
- Xem thêm
- curl_setopt_array [] - Đặt nhiều tùy chọn cho việc chuyển curl
Curlfile ¶
CurlStringFile
$option
25
$option
26
$option
27
$option
28
$option
29
$option
30
rmckay tại WebAware dot com dot au ¶ ¶
10 năm trước
$option
31
$option
32
$option
33
$option
34
$option
35
$option
36
$option
37
$option
38
$option
39
$option
40
$option
41
$option
42
$option
43
$option
44
$option
45
$option
46
$option
47
$option
48
$option
49
$option
50
$option
51
$option
52
$option
30Joey ¶ ¶
6 năm trước
$option
54
$option
55
$option
56
$option
57
$option
30Philippe Dot Jausions tại 11abacus dot com ¶ ¶
16 năm trước
$option
59
$option
60
$option
61
$option
62
$option
63
$option
64
$option
65
$option
66Steve Kamerman ¶ ¶
11 năm trước
$option
67
$option
68
$option
69
$option
70
$option
71Jscott jscott401 tại gmail dot com ¶ ¶
12 năm trước
$option
72
$option
73
$option
74
$option
30ASHW1 - AT - KHÔNG SPAM - POST - DOT - CZ ¶ ¶
11 năm trước
$option
76
$option
77
$option
78
$option
79
$option
80Jscott jscott401 tại gmail dot com ¶ ¶
12 năm trước
$option
81
$option
82
$option
30ASHW1 - AT - KHÔNG SPAM - POST - DOT - CZ ¶ ¶
15 năm trước
$option
84
$option
85
$option
30Ed Cradock ¶ ¶
CurlStringFile
$option
87
$option
88
$option
89
$option
30rmckay tại WebAware dot com dot au ¶ ¶
10 năm trước
$option
91
$option
92
$option
93
6 năm trước ¶
Philippe Dot Jausions tại 11abacus dot com ¶
$option
95
$option
96
$option
3016 năm trước ¶
10 năm trước
$option
98
Joey ¶ ¶
6 năm trước
$option
99
$value
00
$value
01
$value
02
$value
03
$value
04
$option
30Philippe Dot Jausions tại 11abacus dot com ¶ ¶
16 năm trước
$value
06
$value
07
$value
08
$option
30Steve Kamerman ¶ ¶
11 năm trước
$value
10
$value
11
$value
12
$value
13
$option
30Anderseta tại Gmail Dot Com ¶ ¶
12 năm trước
$value
15
$value
16
$value
17
$value
18Jade Dot Skagss tại Gmail Dot Com ¶ ¶
14 năm trước
$value
19
$value
20
$value
21
$value
22Tyranoweb ¶ ¶
13 năm trước
$value
23
$value
24
$value
25
$value
26
$value
27Aaron Wells ¶ ¶
7 năm trước
$value
28
$value
29
$value
30
$value
31
$option
30Badman ¶ ¶
8 năm trước
$value
33
$value
34
$value
35
$value
36
$value
37
$value
38
$value
39
$value
40
$value
41
$option
30fnjordy tại gmail dot com ¶
13 năm trước
$value
43
$value
44
$value
45
$option
30Aaron Wells ¶ ¶
7 năm trước
$value
47
$value
48
$option
30Badman ¶ ¶
8 năm trước
$value
50
$value
51
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
$value
53
$value
54
$option
3016 năm trước ¶
Skyogre __at__ yandex __dot__ ru ¶
$value
56
16 năm trước ¶
13 năm trước
$value
57
$value
58
$value
59
$option
30Aaron Wells ¶ ¶
8 năm trước
$value
61
$value
62
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
$value
64
16 năm trước ¶
Skyogre __at__ yandex __dot__ ru ¶
$value
65
$value
66
$value
67
$value
68
$value
69
$value
70
$value
71
$value
72
$value
73
$value
74
$value
75
$option
3016 năm trước ¶
12 năm trước
$value
77
Juozaspo tại Gmail Dot Com ¶ ¶
7 năm trước
$value
78
$value
79
$value
80
$value
81
$value
82
$value
83
$value
84
$option
30Badman ¶ ¶
7 năm trước
$value
86
$value
87
$option
30Badman ¶ ¶
8 năm trước
$value
89
$value
90
$option
30fnjordy tại gmail dot com ¶
8 năm trước
$value
92
$value
93
$value
94
$value
95
$value
96
$value
97
$value
98
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
00
16 năm trước ¶
8 năm trước
handle
01
handle
02
handle
03
handle
04
handle
05
handle
06
handle
07
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
09
16 năm trước ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
10
handle
11
$option
3016 năm trước ¶
Juozaspo tại Gmail Dot Com ¶
handle
13
handle
14
handle
15
handle
16
handle
1710 năm trước ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
18
handle
19
$option
3016 năm trước ¶
14 năm trước
handle
21
handle
22
handle
23
$option
30Juozaspo tại Gmail Dot Com ¶ ¶
8 năm trước
handle
25
fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
26
handle
27
handle
28
handle
29
handle
30
$option
3016 năm trước ¶
14 năm trước
handle
32
handle
33
handle
34
$option
30Juozaspo tại Gmail Dot Com ¶ ¶
12 năm trước
handle
36
handle
37
handle
38
handle
39
10 năm trước ¶
13 năm trước
handle
40
S \ ¶
8 năm trước
handle
41
fnjordy tại gmail dot com ¶
13 năm trước
handle
42
handle
43
$option
30Skyogre __at__ yandex __dot__ ru ¶ ¶
16 năm trước
handle
45
Juozaspo tại Gmail Dot Com ¶ ¶
10 năm trước
handle
46
S \ ¶
13 năm trước
handle
47
handle
48
handle
49
handle
5011 năm trước ¶
14 năm trước
handle
51
handle
52
$option
30PHP tại rhaworth dot net ¶ ¶
7 năm trước
handle
54
handle
55
$option
30Badman ¶ ¶
8 năm trước
handle
57
handle
58
$option
30fnjordy tại gmail dot com ¶
Juozaspo tại Gmail Dot Com ¶
handle
60
handle
61
handle
6210 năm trước ¶
8 năm trước
handle
63
handle
64
handle
65
handle
66
handle
67
handle
68
handle
69
$option
30fnjordy tại gmail dot com ¶
8 năm trước
handle
71
handle
72
$option
77
handle
74
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
handle
76
handle
77
$option
3016 năm trước ¶
Juozaspo tại Gmail Dot Com ¶
handle
79
handle
37
handle
81
handle
8210 năm trước ¶
8 năm trước
handle
83
handle
84
handle
85
handle
86
handle
87
handle
88
$option
30fnjordy tại gmail dot com ¶
7 năm trước
handle
90
handle
91
handle
92
handle
48
handle
94
handle
95Badman ¶ ¶
12 năm trước
handle
96
handle
97
handle
98
$option
308 năm trước ¶
8 năm trước
option
00
option
01
option
02
option
03
$option
30fnjordy tại gmail dot com ¶
Juozaspo tại Gmail Dot Com ¶
option
05
option
06
option
07
$option
3010 năm trước ¶
13 năm trước
option
09
option
10
$option
30S \ ¶
14 năm trước
option
12
option
13
$option
3011 năm trước ¶
Juozaspo tại Gmail Dot Com ¶
option
15
option
16
$option
3010 năm trước ¶
14 năm trước
option
18
option
19
$option
30S \ ¶
8 năm trước
option
21
option
22
option
23
option
24
option
25
$option
30fnjordy tại gmail dot com ¶
Skyogre __at__ yandex __dot__ ru ¶
option
27
option
28
option
29
option
30
option
31
option
32
option
33
option
34
option
35
option
36
option
37
option
38
option
39
option
40
option
41
$option
3016 năm trước ¶
Juozaspo tại Gmail Dot Com ¶
option
43
option
44
option
45
option
46
option
47
option
48Adrian tại Foeder Dot de ¶ ¶
10 năm trước
option
49
option
50
option
51
option
52
$option
30Ericbianchetti tại Gmail Dot Com ¶ ¶
13 năm trước
option
54
option
55
option
56
$option
30Simbiat tại Outlook Dot Com ¶ ¶
25 ngày trước
option
58
QWERTZ182 ¶ ¶
2 năm trước
option
59
option
60
option
61
option
62
option
63Julien Veneziano ¶ ¶
12 năm trước
option
64
option
65
$option
30nabikaz tại gmail dot com ¶ ¶
5 năm trước
option
67
Bash tại Noemailaddress dot com ¶
4 năm trước
option
68
option
69
$option
30Mikko Dot Rantalainen tại Peda Dot Net ¶
6 năm trước
option
71
Steve tại WebSmithery Dot Co Dot Uk ¶ ¶
5 năm trước
option
72
option
73
$option
30Bash tại Noemailaddress dot com ¶
4 năm trước
option
75
option
76
option
77
$option
30Mikko Dot Rantalainen tại Peda Dot Net ¶
4 năm trước
option
79
option
80
$option
30Mikko Dot Rantalainen tại Peda Dot Net ¶
4 năm trước
option
82
option
83
option
84
$option
30Mikko Dot Rantalainen tại Peda Dot Net ¶
6 năm trước
option
86
option
87
option
88
option
89
option
90
option
91Steve tại WebSmithery Dot Co Dot Uk ¶ ¶
10 năm trước
option
92
Lachlan tại Radelaide Dot Net ¶
10 năm trước
option
93
option
94
$option
308 năm trước ¶
Joan ¶
option
96
option
97
option
98
option
99
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
000$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
001$option
30Gandalf trắng ¶ ¶
12 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
003$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
004$option
30nabikaz tại gmail dot com ¶ ¶
12 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
006handle
37
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
008$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
009nabikaz tại gmail dot com ¶ ¶
12 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
010$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
011$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
012$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
013$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
014nabikaz tại gmail dot com ¶ ¶
13 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
015$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
016$option
305 năm trước ¶
Bash tại Noemailaddress dot com
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
018$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
019$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
020$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
021$option
304 năm trước ¶
Mikko Dot Rantalainen tại Peda Dot Net
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
023$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
024$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
025$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
026$option
306 năm trước ¶
10 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
028$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
029$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
030$option
30Steve tại WebSmithery Dot Co Dot Uk ¶ ¶
Bash tại Noemailaddress dot com
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
0324 năm trước ¶
12 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
033$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
034$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
035$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
036nabikaz tại gmail dot com ¶ ¶
13 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
0375 năm trước ¶
4 năm trước
$latlng = "44.3585230889,8.57745766643";
$lang = "it";
$geocodeURL = "//maps.googleapis.com/maps/api/geocode/json?latlng=$latlng&sensor=false&language=$lang";
$ch = curl_init[$geocodeURL];
curl_setopt[$ch, CURLOPT_RETURNTRANSFER, 1];
$result = curl_exec[$ch];
$httpCode = curl_getinfo[$ch, CURLINFO_HTTP_CODE];
curl_close[$ch];
if [$httpCode == 200] {
$geocode = json_decode[$result];
$location = $geocode->results[0]->address_components[0]->long_name;
$city = $geocode->results[0]->address_components[1]->long_name;
$province = $geocode->results[0]->address_components[2]->long_name;
$region = $geocode->results[0]->address_components[3]->long_name;
$country = $geocode->results[0]->address_components[4]->long_name;
$geo_status = $geocode->status;
$geo_str = "$location, $city, $province, $region, $country";
} else {
$geo_status = "HTTP_FAIL_$httpCode";
$geo_str = "Failed: $geo_status";
}
038