????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.221.176.186 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/curl/tests/ |
Upload File : |
--TEST-- curl_setopt_array() function - tests setting multiple cURL options with curl_setopt_array() --CREDITS-- Mattijs Hoitink mattijshoitink@gmail.com #Testfest Utrecht 2009 --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php /* * Prototype: bool curl_setopt_array(resource $ch, array $options) * Description: Sets multiple options for a cURL session. * Source: ext/curl/interface.c * Documentation: http://wiki.php.net/qa/temp/ext/curl */ // Figure out what handler to use include 'server.inc'; $host = curl_cli_server_start(); if (!empty($host)) { // Use the set Environment variable $url = "{$host}/get.php?test=get"; } else { // Create a temporary file for the test $tempname = tempnam(sys_get_temp_dir(), 'CURL_HANDLE'); $url = 'file://'. $tempname; // add the test data to the file file_put_contents($tempname, "Hello World!\nHello World!"); } // Start the test echo '== Starting test curl_setopt_array($ch, $options); ==' . "\n"; // curl handler $ch = curl_init(); // options for the curl handler $options = array ( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => 1 ); ob_start(); // start output buffering curl_setopt_array($ch, $options); $returnContent = curl_exec($ch); curl_close($ch); var_dump($returnContent); isset($tempname) and is_file($tempname) and @unlink($tempname); ?> --EXPECT-- == Starting test curl_setopt_array($ch, $options); == string(25) "Hello World! Hello World!"