PHP » PYTHON |
login |
register |
about
|
PYTHON curl_exec
is this article helpful?
|
Python replacement for PHP's curl_exec
[
edit
| history
]
import httplib h = 'www.example.com' f = httplib.HTTPConnection(h) f.request("GET",'/') f.getresponse().read() curl_exec(PHP 4 >= 4.0.2, PHP 5) curl_exec — Perform a cURL session DescriptionExecute the given cURL session. This function should be called after initializing a cURL session and all the options for the session are set. Return ValuesReturns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure. Examples
Example #1 Fetching a web page
<?php
|
more
Recently updated
more
Most requested
|