mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-13 07:25:37 +00:00
17 lines
495 B
PHP
17 lines
495 B
PHP
<?php
|
|
class Test {
|
|
const TEST_URL = 'https://127.0.0.1/php-curl-class/tests/server.php';
|
|
|
|
function __construct() {
|
|
$this->curl = new Curl();
|
|
$this->curl->setOpt(CURLOPT_SSL_VERIFYPEER, FALSE);
|
|
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, FALSE);
|
|
}
|
|
|
|
function server($request_method, $data='') {
|
|
$request_method = strtolower($request_method);
|
|
$this->curl->$request_method(self::TEST_URL, $data);
|
|
return $this->curl->response;
|
|
}
|
|
}
|