Initial Commit
This commit is contained in:
28
web/revslider/application/models/curl_model.php
Normal file
28
web/revslider/application/models/curl_model.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Curl_model extends CI_Model {
|
||||
|
||||
/**
|
||||
* Check if Curl available
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
public function test() {
|
||||
$test = function_exists('curl_version');
|
||||
return $test;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do request
|
||||
*
|
||||
* @param string url
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function request($url) {
|
||||
$result = wp_remote_post($url);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user