Skip to content

Instantly share code, notes, and snippets.

View zhelinskyy's full-sized avatar

Artem zhelinskyy

  • Self Employee
  • Kiev
View GitHub Profile
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* @author ([email protected])
* @copyright 2017 CodeIgniter
*/
class Create_item extends Public_Controller
{
public function __construct()
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* @author ([email protected])
* @copyright 2017 CodeIgniter
*/
class Create_product extends Public_Controller
{
public function __construct()
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* @author ([email protected])
* @copyright 2017 CodeIgniter
*/
class Service extends Public_Controller
{
public function __construct()
<?php if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* @author ([email protected])
* @copyright 2017 CodeIgniter
*/
class Register extends Public_Controller
{
public function __construct()
@zhelinskyy
zhelinskyy / Curl
Created March 16, 2017 19:52
Curl
private function curl($url, $content) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $this->header);
curl_setopt($curl, CURLINFO_HEADER_OUT, true);
$server_output = curl_exec ($curl);