位置: 编程技术 - 正文

PHP:curl_version()的用法_cURL函数

编辑:rootadmin
curl_version

推荐整理分享PHP:curl_version()的用法_cURL函数,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 4 >= 4.0.2, PHP 5)

curl_version — 获取cURL版本信息

说明 array curl_version ([ int $age = CURLVERSION_NOW ] )

返回关于cURL的版本信息。

参数

age PHP:curl_version()的用法_cURL函数

返回值

返回一个相关的数组包含如下元素: Indice 值描述 version_number cURL 位版本号 version cURL 版本号,字符串形式 ssl_version_number OpenSSL 位版本号 ssl_version OpenSSL 版本号,字符串形式 libz_version zlib 版本号,字符串形式 host 关于编译cURL主机的信息 age features 一个CURL_VERSION_XXX常量的位掩码 protocols 一个cURL支持的协议名字的数组

范例

Example #1 curl_version() example

这个范例将会检查当前cURL版本使用curl_version()返回的&#;features&#;位掩码中哪些特性是可用的。

<?php//获取cURL版本数组$version=curl_version();//在cURL编译版本中使用位域来检查某些特性$bitfields=Array('CURL_VERSION_IPV6','CURL_VERSION_KERBEROS4','CURL_VERSION_SSL','CURL_VERSION_LIBZ');foreach($bitfieldsas$feature){echo$feature.($version['features']&constant($feature)?'matches':'doesnotmatch');echoPHP_EOL;}?>

PHP:curl_unescape()的用法_cURL函数 curl_unescape(PHP5=5.5.0)curl_unescape解码给定的URL编码的字符串说明stringcurl_unescape(resource$ch,string$str)该函数解码给定的URL编码的字符串。参数ch由curl_init()返回

PHP:curl_strerror()的用法_cURL函数 curl_strerror(PHP5=5.5.0)curl_strerrorReturnstringdescribingthegivenerrorcode说明stringcurl_strerror(int$errornum)Returnsatexterrormessagedescribingthegivenerrorcode.参数errornumOneofthecURLerrorc

PHP:curl_share_setopt()的用法_cURL函数 curl_share_setopt(PHP5=5.5.0)curl_share_setoptSetanoptionforacURLsharehandle.说明boolcurl_share_setopt(resource$sh,int$option,string$value)SetsanoptiononthegivencURLsharehandle.参数shAcURLsharehan

本文链接地址:https://www.jiuchutong.com/biancheng/280549.html 转载请保留说明!

上一篇:PHP:curl_setopt()的用法_cURL函数(php curl_multi_init)

下一篇:PHP:curl_unescape()的用法_cURL函数

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络