Home
last modified time | relevance | path

Searched refs:curl_setopt (Results 1 – 25 of 91) sorted by relevance

1234

/PHP-8.0/ext/curl/tests/
H A Dcurl_setopt_basic004.phpt2 curl_setopt() call with CURLOPT_RETURNTRANSFER
15 echo "*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 1\n";
20 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
21 curl_setopt($ch, CURLOPT_URL, $url);
28 echo "*** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 0\n";
32 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
33 curl_setopt($ch, CURLOPT_URL, $url);
42 *** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 1
44 *** curl_setopt() call with CURLOPT_RETURNTRANSFER set to 0
H A Dcurl_setopt_error.phpt2 curl_setopt() basic parameter test
10 echo "*** curl_setopt() call with incorrect parameters\n";
14 curl_setopt($ch, '', false);
20 curl_setopt($ch, -10, 0);
26 curl_setopt($ch, 1000, 0);
33 *** curl_setopt() call with incorrect parameters
34 curl_setopt(): Argument #2 ($option) must be of type int, string given
35 curl_setopt(): Argument #2 ($option) is not a valid cURL option
36 curl_setopt(): Argument #2 ($option) is not a valid cURL option
H A Dcurl_setopt_basic003.phpt2 curl_setopt() call with CURLOPT_HTTPHEADER
15 echo "*** curl_setopt() call with CURLOPT_HTTPHEADER\n";
21 curl_setopt($ch, CURLOPT_HTTPHEADER, 1);
34 curl_setopt($ch, CURLOPT_HTTPHEADER, array());
35 curl_setopt($ch, CURLOPT_URL, $host);
44 *** curl_setopt() call with CURLOPT_HTTPHEADER
45 curl_setopt(): The CURLOPT_HTTPHEADER option must have an array value
H A Dcurl_share_basic.phpt9 curl_setopt($ch1, CURLOPT_URL, 'file://' . __DIR__ . '/curl_testdata1.txt');
10 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
11 curl_setopt($ch1, CURLOPT_SHARE, $sh);
14 curl_setopt($ch2, CURLOPT_URL, 'file://' . __DIR__ . '/curl_testdata2.txt');
15 curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
16 curl_setopt($ch2, CURLOPT_SHARE, $sh);
H A Dbug63795.phpt12 var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false));
14 var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true));
15 var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0));
16 var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1));
17 var_dump(curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2));
24 Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used i…
28 Notice: curl_setopt(): CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used i…
H A Dcurl_setopt_basic002.phpt2 curl_setopt basic tests with CURLOPT_STDERR.
15 echo "*** Testing curl_setopt with CURLOPT_STDERR\n";
24 curl_setopt($ch, CURLOPT_VERBOSE, 1);
25 curl_setopt($ch, CURLOPT_STDERR, $handle);
35 curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
36 curl_setopt($ch, CURLOPT_STDERR, $handle);
49 *** Testing curl_setopt with CURLOPT_STDERR
H A Dcurl_ftp_pasv.phpt23 // curl_setopt ( $ch , CURLOPT_VERBOSE, 1 );
37 curl_setopt ( $ch , CURLOPT_URL, $url );
38 curl_setopt ( $ch , CURLOPT_TRANSFERTEXT, 1 );
41 curl_setopt ( $ch , CURLOPT_FTP_USE_EPSV, 0 );
42 curl_setopt ( $ch , CURLOPT_FTP_SKIP_PASV_IP, 1 );
45 curl_setopt ( $ch , CURLOPT_INFILE, $fp );
46 curl_setopt ( $ch , CURLOPT_INFILESIZE, filesize(__FILE__) );
47 curl_setopt ( $ch , CURLOPT_PUT, 1 );
48 curl_setopt ( $ch , CURLOPT_UPLOAD, 1 );
H A Dcurl_file_upload.phpt17 curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file));
24 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file");
25 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
36 curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file));
42 curl_setopt($ch, CURLOPT_POSTFIELDS, array("file" => $file));
46 curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 0);
52 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
55 curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
57 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
60 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=post");
[all …]
H A Dbug77535.phpt33 curl_setopt($this->curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
34 curl_setopt($this->curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
35 curl_setopt($this->curl, CURLOPT_HEADER, false);
36 curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, false);
37 curl_setopt($this->curl, CURLOPT_FAILONERROR, false);
38 curl_setopt($this->curl, CURLOPT_URL, 'https://http2.golang.org/serverpush');
39 curl_setopt($this->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
40 curl_setopt($this->curl, CURLOPT_HEADERFUNCTION, function ($ch, $data) {
43 curl_setopt($this->curl, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
H A Dbug52202.phpt10 curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
11 curl_setopt($curl, CURLOPT_PRIVATE, "123");
12 curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
13 curl_setopt($curl, CURLOPT_TIMEOUT, 1);
H A Dbug27023.phpt13 curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
14 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file");
15 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
19 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
24 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
29 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
34 curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
H A Dbug65646_open_basedir_new.phpt12 var_dump(curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true));
13 var_dump(curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_FILE));
14 var_dump(curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_FILE));
20 Warning: curl_setopt(): CURLPROTO_FILE cannot be activated when an open_basedir is set in %s on lin…
23 Warning: curl_setopt(): CURLPROTO_FILE cannot be activated when an open_basedir is set in %s on lin…
H A Dbug66109.phpt10 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=method");
11 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
13 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
16 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, NULL);
H A Dbug76675.phpt21 curl_setopt($passed, CURLOPT_WRITEFUNCTION, function ($ch, $data) {
32 curl_setopt($ch, CURLOPT_URL, 'https://http2.golang.org/serverpush');
33 curl_setopt($ch, CURLOPT_HTTP_VERSION, 3);
34 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
35 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
36 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
H A Dbug77711.phpt11 curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
12 curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file");
13 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
19 var_dump(curl_setopt($ch, CURLOPT_POSTFIELDS, $params));
H A Dcurl_CURLOPT_READDATA.phpt23 curl_setopt($ch, CURLOPT_URL, $url);
24 curl_setopt($ch, CURLOPT_POST, true);
25 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
26 curl_setopt($ch, CURLOPT_READDATA, fopen($tempname, 'rb'));
27 curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:', "Content-Length: {$datalen}"));
H A Dbug61948-unix.phpt13 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
14 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
15 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
22 Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowe…
H A Dcurl_file_upload_stream.phpt13 curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
14 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file");
15 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
19 var_dump(curl_setopt($ch, CURLOPT_POSTFIELDS, $params));
H A Dbug54798.phpt17 curl_setopt($ch, CURLOPT_VERBOSE, 1);
21 curl_setopt($ch, CURLOPT_UPLOAD, 1);
24 curl_setopt($ch, $curl_option, $fp);
26 curl_setopt($ch, CURLOPT_URL, $host);
27 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
H A Dcurl_copy_handle_basic_007.phpt16 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
17 curl_setopt($ch, CURLOPT_POST, 1);
18curl_setopt($ch, CURLOPT_POSTFIELDS, array("Hello" => "World", "Foo" => "Bar", "Person" => "John D…
19curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); // Disable Expect: header (lighttpd does n…
20 curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
H A Dcurl_basic_002.phpt14 echo '*** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***' . "\n";
20 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
21 curl_setopt($ch, CURLOPT_URL, $url); //set the url we want to use
29 *** Testing curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); ***
H A Dcurl_copy_handle_variation3.phpt11 curl_setopt($ch1, CURLOPT_SAFE_UPLOAD, 1);
12 curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=file");
13 curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
19 var_dump(curl_setopt($ch1, CURLOPT_POSTFIELDS, $params));
H A Dbug54798-unix.phpt20 curl_setopt($ch, CURLOPT_VERBOSE, 1);
24 curl_setopt($ch, CURLOPT_UPLOAD, 1);
27 curl_setopt($ch, $curl_option, $fp);
29 curl_setopt($ch, CURLOPT_URL, $host);
30 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
H A Dbug61948.phpt14 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
15 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "$base_dir/foo"));
16 var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
29 Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allo…
H A Dbug45161.phpt19 curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/');
20 curl_setopt($ch, CURLOPT_FILE, $fp);
28 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc");
29 curl_setopt($ch, CURLOPT_FILE, $fp);

Completed in 22 milliseconds

1234