예제 #1
0
        $this->response['info'] = curl_getinfo($this->ch);
        if (curl_errno($this->ch)) {
            $this->response['error'] = curl_error($this->ch);
        }
        curl_close($this->ch);
    }
    function results()
    {
        return $this->response['data'];
    }
}
class VerifyCredentialsProxy extends Proxy
{
    function __construct($host, $path)
    {
        parent::__construct($host, $path);
    }
    function process()
    {
        parent::process();
    }
}
if ($_REQUEST['host'] == 'twitter.com' && $_REQUEST['path'] == 'account/verify_credentials.json') {
    $request = new VerifyCredentialsProxy($_REQUEST['host'], $_REQUEST['path']);
} else {
    $request = new Proxy($_REQUEST['host'], $_REQUEST['path']);
}
$request->args($_REQUEST['args'], $_REQUEST['type']);
$request->process();
echo $request->results();