mirror of
https://github.com/kokororin/typecho-plugin-Access.git
synced 2025-01-30 22:30:27 +08:00
30 lines
555 B
PHP
30 lines
555 B
PHP
<?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()
|
|
{
|
|
}
|
|
|
|
public function ip()
|
|
{
|
|
$ip = $this->request->get('ip');
|
|
$response = file_get_contents('http://ip.taobao.com/service/getIpInfo.php?ip=' . $ip);
|
|
exit($response);
|
|
}
|
|
|
|
}
|