Esempio n. 1
0
 function post($link = '', $field = array())
 {
     include_once 'application/libraries/eac_curl.class.php';
     $options = array();
     $fields = array();
     $options['CURLOPT_AUTOREFERER'] = 1;
     $options['CURLOPT_CRLF'] = 1;
     $options['CURLOPT_NOPROGRESS'] = 1;
     $options['CURLOPT_RETURNTRANSFER'] = 1;
     $http = new cURL($options);
     $http->setOptions($options);
     $result = $http->post($link, $field);
     return $result;
 }
Esempio n. 2
0
 function curlPost($link = '', $field = array())
 {
     $options = array();
     $fields = array();
     $options['CURLOPT_AUTOREFERER'] = 1;
     $options['CURLOPT_CRLF'] = 1;
     $options['CURLOPT_NOPROGRESS'] = 1;
     $options['CURLOPT_RETURNTRANSFER'] = 1;
     //login htpaswd
     if ($htpassInfo) {
         $options['CURLOPT_USERPWD'] = $htpassInfo;
         $options['CURLOPT_HTTPAUTH'] = CURLAUTH_ANY;
     }
     $http = new cURL($options);
     $http->setOptions($options);
     $result = $http->post($link, $field);
     return $result;
 }