<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/curl.php</filename>
    </added>
    <added>
      <filename>lib/curl_response.php</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1 @@
-.DS_Store
 curl_cookie.txt
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,145 +1,4 @@
 &lt;?php
 
-# Curl, CurlResponse
-#
-# Author  Sean Huber - shuber@huberry.com
-# Date    May 2008
-#
-# A basic CURL wrapper for PHP
-#
-# See the README for documentation/examples or http://php.net/curl for more information about the libcurl extension for PHP
-
-class Curl 
-{
-    public $cookie_file;
-    public $headers = array();
-    public $options = array();
-    public $referer = '';
-    public $user_agent = '';
-
-    protected $error = '';
-    protected $handle;
-
-
-    public function __construct() 
-    {
-        $this-&gt;cookie_file = dirname(__FILE__).'/curl_cookie.txt';
-        $this-&gt;user_agent = isset($_SERVER['HTTP_USER_AGENT']) ?
-            $_SERVER['HTTP_USER_AGENT'] :
-            'Curl/PHP ' . PHP_VERSION . ' (http://github.com/shuber/curl/)';
-    }
-
-    public function delete($url, $vars = array()) 
-    {
-        return $this-&gt;request('DELETE', $url, $vars);
-    }
-
-    public function error() 
-    {
-        return $this-&gt;error;
-    }
-
-    public function get($url, $vars = array()) 
-    {
-        if (!empty($vars)) {
-            $url .= (stripos($url, '?') !== false) ? '&amp;' : '?';
-            $url .= http_build_query($vars, '', '&amp;');
-        }
-        return $this-&gt;request('GET', $url);
-    }
-
-    public function post($url, $vars = array()) 
-    {
-        return $this-&gt;request('POST', $url, $vars);
-    }
-
-    public function put($url, $vars = array()) 
-    {
-        return $this-&gt;request('PUT', $url, $vars);
-    }
-
-    protected function request($method, $url, $vars = array()) 
-    {
-        $this-&gt;handle = curl_init();
-        
-        # Determine the request method and set the correct CURL option
-        switch ($method) {
-            case 'GET':
-                curl_setopt($this-&gt;handle, CURLOPT_HTTPGET, true);
-                break;
-            case 'POST':
-                curl_setopt($this-&gt;handle, CURLOPT_POST, true);
-                break;
-            default:
-                curl_setopt($this-&gt;handle, CURLOPT_CUSTOMREQUEST, $method);
-        }
-        
-        # Set some default CURL options
-        curl_setopt($this-&gt;handle, CURLOPT_COOKIEFILE, $this-&gt;cookie_file);
-        curl_setopt($this-&gt;handle, CURLOPT_COOKIEJAR, $this-&gt;cookie_file);
-        curl_setopt($this-&gt;handle, CURLOPT_FOLLOWLOCATION, true);
-        curl_setopt($this-&gt;handle, CURLOPT_HEADER, true);
-        if (!empty($vars)) curl_setopt($this-&gt;handle, CURLOPT_POSTFIELDS, (is_array($vars) ? http_build_query($vars, '', '&amp;') : $vars));
-        curl_setopt($this-&gt;handle, CURLOPT_REFERER, $this-&gt;referer);
-        curl_setopt($this-&gt;handle, CURLOPT_RETURNTRANSFER, true);
-        curl_setopt($this-&gt;handle, CURLOPT_URL, $url);
-        curl_setopt($this-&gt;handle, CURLOPT_USERAGENT, $this-&gt;user_agent);
-        
-        # Format custom headers for this request and set CURL option
-        $headers = array();
-        foreach ($this-&gt;headers as $key =&gt; $value) {
-            $headers[] = $key.': '.$value;
-        }
-        curl_setopt($this-&gt;handle, CURLOPT_HTTPHEADER, $headers);
-        
-        # Set any custom CURL options
-        foreach ($this-&gt;options as $option =&gt; $value) {
-            curl_setopt($this-&gt;handle, constant('CURLOPT_'.str_replace('CURLOPT_', '', strtoupper($option))), $value);
-        }
-        
-        $response = curl_exec($this-&gt;handle);
-        if ($response) {
-            $response = new CurlResponse($response);
-        } else {
-            $this-&gt;error = curl_errno($this-&gt;handle).' - '.curl_error($this-&gt;handle);
-        }
-        curl_close($this-&gt;handle);
-        return $response;
-    }
-
-}
-
-class CurlResponse 
-{
-    public $body = '';
-    public $headers = array();
-
-    public function __construct($response) 
-    {
-        # Extract headers from response
-        $pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
-        preg_match_all($pattern, $response, $matches);
-        $headers = split(&quot;\r\n&quot;, str_replace(&quot;\r\n\r\n&quot;, '', array_pop($matches[0])));
-        
-        # Extract the version and status from the first header
-        $version_and_status = array_shift($headers);
-        preg_match('#HTTP/(\d\.\d)\s(\d\d\d)\s(.*)#', $version_and_status, $matches);
-        $this-&gt;headers['Http-Version'] = $matches[1];
-        $this-&gt;headers['Status-Code'] = $matches[2];
-        $this-&gt;headers['Status'] = $matches[2].' '.$matches[3];
-        
-        # Convert headers into an associative array
-        foreach ($headers as $header) {
-            preg_match('#(.*?)\:\s(.*)#', $header, $matches);
-            $this-&gt;headers[$matches[1]] = $matches[2];
-        }
-        
-        # Remove the headers from the response body
-        $this-&gt;body = preg_replace($pattern, '', $response);
-    }
-
-    public function __toString() 
-    {
-        return $this-&gt;body;
-    }
-}
+require_once 'lib'.DIRECTORY_SEPARATOR.'curl.php';
+require_once 'lib'.DIRECTORY_SEPARATOR.'curl_response.php';
\ No newline at end of file</diff>
      <filename>curl.php</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>CHANGELOG</filename>
    </removed>
    <removed>
      <filename>curl.php4</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>6a53322aa47f39dbdc9eae06d1026954c371b53b</id>
    </parent>
  </parents>
  <author>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </author>
  <url>http://github.com/shuber/curl/commit/0f3d840505a74eb083dcdae8329f00c9b710a735</url>
  <id>0f3d840505a74eb083dcdae8329f00c9b710a735</id>
  <committed-date>2009-09-04T22:17:07-07:00</committed-date>
  <authored-date>2009-09-04T22:17:07-07:00</authored-date>
  <message>Restructure and add documentation</message>
  <tree>9cfc5783350817db2e04e4a56fecd4a5321302d6</tree>
  <committer>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </committer>
</commit>
