2016-03-28 14:45:00 +08:00
|
|
|
<?php
|
|
|
|
class Access_Action implements Widget_Interface_Do
|
|
|
|
{
|
|
|
|
|
|
|
|
private $response;
|
|
|
|
private $request;
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->response = Typecho_Response::getInstance();
|
|
|
|
$this->request = Typecho_Request::getInstance();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function execute()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function action()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-08-01 15:00:23 +08:00
|
|
|
public function ip()
|
2016-03-28 14:45:00 +08:00
|
|
|
{
|
|
|
|
$ip = $this->request->get('ip');
|
2016-08-01 15:00:23 +08:00
|
|
|
$response = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip=' . $ip);
|
|
|
|
exit($response);
|
2016-03-28 14:45:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|