Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test curl_copy_handle() change options in one handle --CREDITS-- Francesco Fullon..
Decoded Output download
*** Testing curl_copy_handle(): basic ***
Did this file decode correctly?
Original Code
--TEST--
Test curl_copy_handle() change options in one handle
--CREDITS--
Francesco Fullone [email protected]
#PHPTestFest Cesena Italia on 2009-06-20
--EXTENSIONS--
curl
--FILE--
<?php
echo "*** Testing curl_copy_handle(): basic ***\n";
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/');
// copy the handle
$ch2 = curl_copy_handle($ch);
// change the CURLOPT_URL for the second handle
curl_setopt($ch2, CURLOPT_URL, 'http://www.bar.com/');
var_dump(curl_getinfo($ch) === curl_getinfo($ch2));
?>
--EXPECT--
*** Testing curl_copy_handle(): basic ***
bool(false)
Function Calls
curl_init | 1 |
Stats
MD5 | 524f8dfd7caee2c533108e9ba402f2b3 |
Eval Count | 0 |
Decode Time | 69 ms |