SILENT KILLERPanel

Current Path: > > opt > hc_python > > share > doc > pycurl > examples > > quickstart


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/hc_python//share/doc/pycurl/examples//quickstart

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
file_upload_buffer.py File 311 bytes April 04 2025 08:01:39.
file_upload_real.py File 291 bytes April 04 2025 08:01:39.
file_upload_real_fancy.py File 483 bytes April 04 2025 08:01:39.
follow_redirect.py File 250 bytes April 04 2025 08:01:39.
form_post.py File 564 bytes April 04 2025 08:01:39.
get.py File 583 bytes April 04 2025 08:01:39.
get_python2.py File 447 bytes April 04 2025 08:01:39.
get_python2_https.py File 498 bytes April 04 2025 08:01:39.
get_python3.py File 403 bytes April 04 2025 08:01:39.
get_python3_https.py File 454 bytes April 04 2025 08:01:39.
put_buffer.py File 472 bytes April 04 2025 08:01:39.
put_file.py File 300 bytes April 04 2025 08:01:39.
response_headers.py File 2097 bytes April 04 2025 08:01:39.
response_info.py File 498 bytes April 04 2025 08:01:39.
write_file.py File 357 bytes April 04 2025 08:01:39.

Reading File: //opt/hc_python//share/doc/pycurl/examples//quickstart/get_python2_https.py

#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import pycurl
import certifi
from StringIO import StringIO

buffer = StringIO()
c = pycurl.Curl()
c.setopt(c.URL, 'http://pycurl.io/')
c.setopt(c.WRITEDATA, buffer)
# For older PycURL versions:
#c.setopt(c.WRITEFUNCTION, buffer.write)
c.setopt(c.CAINFO, certifi.where())
c.perform()
c.close()

body = buffer.getvalue()
# Body is a string in some encoding.
# In Python 2, we can print it without knowing what the encoding is.
print(body)

SILENT KILLER Tool