Overview

Namespaces

  • Kotchasan
    • Cache
    • Database
    • Http
    • Log
    • Orm
  • None
  • PDF
  • PHP
  • Psr
    • Cache
    • Http
      • Message
    • Log

Classes

  • Accordion
  • ArrayTool
  • CKEditor
  • Collection
  • Config
  • Controller
  • Country
  • Csv
  • Curl
  • Currency
  • Database
  • DataTable
  • Date
  • DOMNode
  • DOMParser
  • Email
  • File
  • Files
  • Form
  • Grid
  • Html
  • Htmldoc
  • HtmlTable
  • Image
  • InputItem
  • Inputs
  • KBase
  • Language
  • ListItem
  • Login
  • Menu
  • Mime
  • Model
  • Number
  • Object
  • Password
  • Pdf
  • Province
  • Router
  • Singleton
  • Tab
  • TableRow
  • Template
  • Text
  • Validator
  • View
  • Overview
  • Namespace
  • Class
  • Tree

Class Curl

Curl Class.

Namespace: Kotchasan
Author: Goragod Wiriya admin@goragod.com
Since: 1.0
Located at Kotchasan/Curl.php
Methods summary
public
# __construct( )

Construct.

Construct.

Throws

ErrorException
ถ้าไม่รองรับ cURL
public string
# delete( string $url, mix $params )

DELETE.

DELETE.

Parameters

$url
$params

Returns

string
public integer
# error( )

คืนค่า error no จากการ cURL 0 หมายถึงไม่มี error.

คืนค่า error no จากการ cURL 0 หมายถึงไม่มี error.

Returns

integer
public string
# errorMessage( )

คืนค่าข้อความ Error จาก cURL หากมีข้อผิดพลาดในการส่ง.

คืนค่าข้อความ Error จาก cURL หากมีข้อผิดพลาดในการส่ง.

Returns

string
public string
# get( string $url, mix $params = array() )

GET.

GET.

Parameters

$url
$params

Returns

string
public string
# head( string $url, mix $params = array() )

HEAD.

HEAD.

Parameters

$url
$params

Returns

string
public
# httpauth( string $username = '', string $password = '', string $type = 'any' )

Login สำหรับการส่งแบบ HTTP.

Login สำหรับการส่งแบบ HTTP.

Parameters

$username
$password
$type
any (default), digest, basic, digest_ie, negotiate, ntlm, ntlm_wb, anysafe, only

Returns


$this
public
# httpproxy( string $url = '', integer $port = 80, string $username = null, string $password = null )

ใช้งาน PROXY.

ใช้งาน PROXY.

Parameters

$url
$port
$username
$password

Returns


$this
public string
# post( string $url, mix $params = array() )

POST.

POST.

Parameters

$url
$params

Returns

string
public string
# put( string $url, mix $params = array() )

PUT.

PUT.

Parameters

$url
$params

Returns

string
public
# referer( string $referrer )

กำหนด referer.

กำหนด referer.

Parameters

$referrer

Returns


$this
public
# setCookie( string $cookiePath )

กำหนดค่า cookie file.

กำหนดค่า cookie file.

Parameters

$cookiePath

Returns


$this
public
# setHeaders( array $headers )

กำหนด Header.

กำหนด Header.

Parameters

$headers

Returns


$this
public
# setOptions( array $options )

กำหนด Options.

กำหนด Options.

Parameters

$options

Returns


$this
protected string
# execute( string $url )

ประมวลผล cURL.

ประมวลผล cURL.

Parameters

$url

Returns

string
Properties summary
protected integer $error

ตัวแปรสำหรับเก็บ Error ที่มาจาก cURL 0 ไม่มี error (ค่าเริ่มต้น) มากกว่า 0 Error No. ของ cURL.

ตัวแปรสำหรับเก็บ Error ที่มาจาก cURL 0 ไม่มี error (ค่าเริ่มต้น) มากกว่า 0 Error No. ของ cURL.

# 0
protected string $errorMessage

ข้อความ Error จาก cURL หากมีข้อผิดพลาดในการส่ง.

ข้อความ Error จาก cURL หากมีข้อผิดพลาดในการส่ง.

# ''
protected array $headers

HTTP headers.

HTTP headers.

# array()
protected array $options

พารามิเตอร์ CURLOPT.

พารามิเตอร์ CURLOPT.

# array()
kotchasan API documentation generated by ApiGen