PHP » PYTHON |
login |
register |
about
|
PYTHON curl_setopt
is this article helpful?
|
Python replacement for PHP's curl_setopt
[
edit
| history
]
http://docs.python.org/library/httplib.html#httplib.HTTPSConnection
For "CURLOPT_SSLCERT" in python simply point your key_file & cert_file kwargs to the pem file. curl_setopt(PHP 4 >= 4.0.2, PHP 5) curl_setopt — Set an option for a cURL transfer DescriptionSets an option on the given cURL session handle. Parameters
Return ValuesReturns TRUE on success or FALSE on failure. Examples
Example #1 Initializing a new cURL session and fetching a web page
<?php
Example #2 Uploading file
<?phpThe above example will output:
Array
(
[name] => Foo
)
Array
(
[file] => Array
(
[name] => test.png
[type] => image/png
[tmp_name] => /tmp/phpcpjNeQ
[error] => 0
[size] => 279
)
)
|
more
Recently updated
more
Most requested
more
Last requests
|