Skip to content

Commit 1cfc048

Browse files
authored
Update and rename config.php to Api.php
1 parent 6401489 commit 1cfc048

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

src/Api.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
namespace usualtool\Api;
3+
use library\UsualToolInc;
4+
class Api{
5+
public function __construct(){
6+
global$config;
7+
$this->authcode=$config["UTCODE"];
8+
$this->authurl=$config["UTFURL"];
9+
$this->type="openapi";
10+
}
11+
public function Run($api,$param){
12+
$from=UsualToolInc\UTInc::CurPageUrl();
13+
$url=$this->authurl."?AuthCode=".$this->authcode."&FromUrl=".$from."&Type=".$this->type."-".$api;
14+
$result=UsualToolInc\UTInc::HttpPost($url,$param);
15+
return str_replace("#","$",str_replace("&","=",UsualToolInc\UTInc::StrSubstr("<php>","</php>",$result)));
16+
}
17+
}

src/config.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)