search
HomeBackend DevelopmentPHP TutorialPHP4 User Manual: Function-CURL-curl_setopt_PHP Tutorial

TABLE border=0 cellPadding=0 cellSpacing=0 height="100%" width="100%">

(PHP 4 >= 4.0.2)
curl_setopt -- Settings for CURL calls An option
description

bool curl_setopt (int ch, string option, mixed value)

The curl_setopt() function will set options for a CURL session. The option parameter is the setting you want, and value is the value given by this option.
The values ​​of the following options will be used as long integers (specified in the option parameter):

CURLOPT_INFILESIZE: When you upload a file to the remote site, this option tells PHP the size of the file you are uploading.
CURLOPT_VERBOSE: If you want CURL to report every unexpected event, set this option to a non-zero value.
CURLOPT_HEADER: If you want to include a header in the output, set this option to a non-zero value.
CURLOPT_NOPROGRESS: If you do not want PHP to display a progress bar for CURL transfers, set this option to a non-zero value.
Note: PHP automatically sets this option to a non-zero value, you should only change this option for debugging purposes.
CURLOPT_NOBODY: If you do not want to include the body part in the output, set this option to a non-zero value.
CURLOPT_FAILONERROR: If you want PHP not to display when an error occurs (HTTP code return greater than or equal to 300), set this option to a non-zero value. The default behavior is to return a normal page and ignore the code.
CURLOPT_UPLOAD: If you want PHP to prepare for uploading, set this option to a non-zero value.
CURLOPT_POST: If you want PHP to do a regular HTTP POST, set this option to a non-zero value. This POST is of the ordinary application/x-www-from-urlencoded type, mostly used by HTML forms.
CURLOPT_FTPLISTONLY: Set this option to a non-zero value and PHP will list the directory names for FTP.
CURLOPT_FTPAPPEND: Set this option to a non-zero value and PHP will apply the remote file instead of overwriting it.
CURLOPT_NETRC: Set this option to a non-zero value and PHP will look in your ~./netrc file for the username and password of the remote site you want to connect to.
CURLOPT_FOLLOWLOCATION: Set this option to a non-zero header (like "Location: ") and the server will send it as part of the HTTP header (note that this is recursive, PHP will send a header of the form "Location: " head).
CURLOPT_PUT: Set this option to a non-zero value to upload a file using HTTP. To upload this file you must set the CURLOPT_INFILE and CURLOPT_INFILESIZE options.
CURLOPT_MUTE: Set this option to a non-zero value and PHP will be completely silent for the CURL function.
CURLOPT_TIMEOUT: Set a long integer as the maximum number of seconds.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629449.htmlTechArticleTABLE border=0 cellPadding=0 cellSpacing=0 height=100% width=100% (PHP 4 = 4.0. 2) curl_setopt -- Set an option description for CURL call bool curl_setopt (int ch, string option, mixe...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Windows 11 上缺少本地用户和组:如何添加它Windows 11 上缺少本地用户和组:如何添加它Sep 22, 2023 am 08:41 AM

“本地用户和组”实用程序内置于“计算机管理”中,可以从控制台访问,也可以独立访问。但是,一些用户发现Windows11中缺少本地用户和组。对于可以访问它的一些人来说,该消息显示,此管理单元可能不适用于此版本的Windows10。若要管理此计算机的用户帐户,请使用“控制面板”中的“用户帐户”工具。该问题已在上一次迭代Windows10中报告,并且通常是由于用户端的问题或疏忽引起的。为什么Windows11中缺少本地用户和组?您运行的是Windows家庭版,本地用户和组在专业版及更高版本上可用。活动

探索Windows 11指南:如何访问旧硬盘驱动器上的用户文件夹探索Windows 11指南:如何访问旧硬盘驱动器上的用户文件夹Sep 27, 2023 am 10:17 AM

由于权限,并不总是可以访问某些文件夹,在今天的指南中,我们将向您展示如何在Windows11上的旧硬盘驱动器上访问用户文件夹。此过程很简单,但可能需要一段时间,有时甚至数小时,具体取决于驱动器的大小,因此请格外耐心并严格按照本指南中的说明进行操作。为什么我无法访问旧硬盘上的用户文件夹?用户文件夹的所有权属于另一台电脑,因此您无法对其进行修改。除了所有权之外,您对该文件夹没有任何权限。如何打开旧硬盘上的用户文件?1.取得文件夹的所有权并更改权限找到旧的用户目录,右键单击它,然后选择属性。导航到“安

教程:Ubuntu系统如何删除普通用户账户?教程:Ubuntu系统如何删除普通用户账户?Jan 02, 2024 pm 12:34 PM

Ubuntu系统添加了很多用户,想在不用的用户想要删除,该怎么删除呢?下面我们就来看看详细的教程。1、打开终端命令行,运用userdel命令删除指定的用户,注意要加sudo权限指令,如下图所示2、在删除的时候一定注意是在管理员目录下的,普通的用户是没有这个权限的,如下图所示3、删除指令执行完了以后怎么判断是否真正删除了呢?下面我们运用cat命令打开passwd文件,如下图所示4、我们看到passwd文件中已经没有了所删除的用户信息了,这证明用户已经被删除了,如下图所示5、然后我们进入home文件

Windows 11 KB5031455无法安装,导致某些用户出现其他问题Windows 11 KB5031455无法安装,导致某些用户出现其他问题Nov 01, 2023 am 08:17 AM

Microsoft开始推出作为Windows503145511H22或更高版本的可选更新向公众KB2。这是第一个默认启用Windows11Moment4功能的更新,包括受支持区域中的WindowsCopilot、对“开始”菜单中项目的预览支持、任务栏的取消分组等。此外,它还修复了Windows11的几个错误,包括导致内存泄漏的潜在性能问题。但具有讽刺意味的是,2023年<>月的可选更新对于尝试安装更新的用户甚至已经安装更新的用户来说都是一场灾难。许多用户不会安装此Wi

Win11 新版画图:一键移除背景实现抠图功能Win11 新版画图:一键移除背景实现抠图功能Sep 15, 2023 pm 10:53 PM

微软邀请Canary和Dev频道的WindowsInsider项目成员,测试和体验新版画图(Paint)应用,最新版本号为11.2306.30.0。本次版本更新最值得关注的新功能是一键抠图功能,用户只需要点击一下,就能自动消除背景,凸显画面主体,便于用户后续操作。整个步骤非常简单,用户在新版画图应用中导入图片,然后点击工具栏上“移除背景”(removebackground)按钮,就可以删除图片中的背景,用户也可以使用矩形来选择要消除背景的区域。

TranslucentTB不起作用:如何解决TranslucentTB不起作用:如何解决Jun 06, 2023 am 08:21 AM

TranslucentTB是寻求时尚简约桌面外观的Windows11爱好者广泛使用的工具,遇到了障碍。自从发布以来Windows11内部版本22621.1344(22H2)28年2023月日,TranslucentTB对大多数用户不起作用。此错误使用户努力应对其任务栏的有限自定义选项。用户在寻求克服这一挫折的解决方案时,挫败感显而易见。在最近的Windows11更新之后,TranslucentTB无法正常工作的问题已在多个在线平台上广泛报道,包括论坛和社交媒体。用户一直在分享他们的经验,拼命寻找

mysql 怎么修改hostmysql 怎么修改hostFeb 15, 2023 am 10:17 AM

mysql修改host的方法:1、通过“sudo service mysql stop”停掉mysql服务;2、以安全模式启动mysql,然后重置root密码;3、通过“update user set Host='%' where User='hive';”语句修改host即可。

如何下载iPhone地图以供离线使用如何下载iPhone地图以供离线使用Nov 04, 2023 pm 11:13 PM

随着iOS17的推出,Apple使iPhone用户可以下载地图以供离线使用。此功能为可能前往互联网连接不可靠或不存在的地区的用户提供了实用的解决方案。通过将地图下载到他们的设备上,用户可以确保即使失去蜂窝连接,他们也可以始终访问他们想要的路线。离线地图不仅仅是一个位置的静态图像。它们为用户提供了丰富的信息,例如地点的小时数和评级、转弯路线和预计到达时间。这意味着即使没有Wi-Fi或蜂窝连接,用户仍然可以导航和访问有关周围环境的关键信息。在“地图”中使用搜索功能打开“地图”应用,在搜索中搜索某个地

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.