webmain/task/openapi/openapiAction.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
*	对外开发接口文件
*	createname:信呼
*	homeurl:http://www.rockoa.com/
*	Copyright (c) 2016 rainrock (www.rockoa.com)
*	Date:2016-11-01
*	explain:返回200为正常
*	post需开启:always_populate_raw_post_data = On
*/
class openapiAction extends ActionNot
{
	private $openkey = '';
	public 	$postdata= '';
	
	//是否验证openkey
	protected 	$keycheck= true;
	
	public function initAction()
	{
		$this->display= false;
		$openkey 		= $this->post('openkey');
		$this->openkey 	= getconfig('openkey');
		if($this->keycheck && $this->openkey != ''){
			if($openkey != md5($this->openkey))$this->showreturn('', 'openkey not access', 201);
		}
		$this->getpostdata();
	}
	
	public function getpostdata()
	{
		if(isset($GLOBALS['HTTP_RAW_POST_DATA']))$this->postdata = $GLOBALS['HTTP_RAW_POST_DATA'];
		if($this->postdata=='')$this->postdata = trim(file_get_contents('php://input'));
	}
	
	public function getvals($nae, $dev='')
	{
		$sv = $this->rock->jm->base64decode($this->post($nae));
		if($this->isempt($sv))$sv=$dev;
		return $sv;
	}
	
	/**
	*	获取提交的数据
	*/
	public function getpostarr()
	{
		$str = $this->postdata;
		if(isempt($str))return false;
		$arr 	= json_decode($str, true);
		return $arr;
	}
	
	/**
	*	根据关键字获取用户
	*/
	public function getuserid($id, $sur=true)
	{
		if(isempt($id))return 0;
		$where = "`user`='$id'";
后面还有 24 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。