|
|
|
@ -1101,46 +1101,68 @@ PHP_FUNCTION(curl_getinfo) |
|
|
|
|
|
|
|
array_init(return_value); |
|
|
|
|
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_EFFECTIVE_URL, &s_code); |
|
|
|
CAAS("url", s_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_TYPE, &s_code); |
|
|
|
CAAS("content_type", s_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_HTTP_CODE, &l_code); |
|
|
|
CAAL("http_code", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_HEADER_SIZE, &l_code); |
|
|
|
CAAL("header_size", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_REQUEST_SIZE, &l_code); |
|
|
|
CAAL("request_size", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_FILETIME, &l_code); |
|
|
|
CAAL("filetime", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_SSL_VERIFYRESULT, &l_code); |
|
|
|
CAAL("ssl_verify_result", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_COUNT, &l_code); |
|
|
|
CAAL("redirect_count", l_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_TOTAL_TIME, &d_code); |
|
|
|
CAAD("total_time", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_NAMELOOKUP_TIME, &d_code); |
|
|
|
CAAD("namelookup_time", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME, &d_code); |
|
|
|
CAAD("connect_time", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_PRETRANSFER_TIME, &d_code); |
|
|
|
CAAD("pretransfer_time", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_UPLOAD, &d_code); |
|
|
|
CAAD("size_upload", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_SIZE_DOWNLOAD, &d_code); |
|
|
|
CAAD("size_download", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_DOWNLOAD, &d_code); |
|
|
|
CAAD("speed_download", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_SPEED_UPLOAD, &d_code); |
|
|
|
CAAD("speed_upload", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d_code); |
|
|
|
CAAD("download_content_length", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_UPLOAD, &d_code); |
|
|
|
CAAD("upload_content_length", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_STARTTRANSFER_TIME, &d_code); |
|
|
|
CAAD("starttransfer_time", d_code); |
|
|
|
curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_TIME, &d_code); |
|
|
|
CAAD("redirect_time", d_code); |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_EFFECTIVE_URL, &s_code) == CURLE_OK) { |
|
|
|
CAAS("url", s_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_TYPE, &s_code) == CURLE_OK) { |
|
|
|
if (s_code != NULL) { |
|
|
|
CAAS("content_type", s_code); |
|
|
|
} |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_HTTP_CODE, &l_code) == CURLE_OK) { |
|
|
|
CAAL("http_code", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_HEADER_SIZE, &l_code) == CURLE_OK) { |
|
|
|
CAAL("header_size", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_REQUEST_SIZE, &l_code) == CURLE_OK) { |
|
|
|
CAAL("request_size", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_FILETIME, &l_code) == CURLE_OK) { |
|
|
|
CAAL("filetime", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_SSL_VERIFYRESULT, &l_code) == CURLE_OK) { |
|
|
|
CAAL("ssl_verify_result", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_COUNT, &l_code) == CURLE_OK) { |
|
|
|
CAAL("redirect_count", l_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_TOTAL_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("total_time", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_NAMELOOKUP_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("namelookup_time", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("connect_time", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_PRETRANSFER_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("pretransfer_time", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_SIZE_UPLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("size_upload", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_SIZE_DOWNLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("size_download", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_SPEED_DOWNLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("speed_download", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_SPEED_UPLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("speed_upload", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("download_content_length", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_CONTENT_LENGTH_UPLOAD, &d_code) == CURLE_OK) { |
|
|
|
CAAD("upload_content_length", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_STARTTRANSFER_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("starttransfer_time", d_code); |
|
|
|
} |
|
|
|
if (curl_easy_getinfo(ch->cp, CURLINFO_REDIRECT_TIME, &d_code) == CURLE_OK) { |
|
|
|
CAAD("redirect_time", d_code); |
|
|
|
} |
|
|
|
} else { |
|
|
|
option = Z_LVAL_PP(zoption); |
|
|
|
switch (option) { |
|
|
|
|