| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\utils;
- use app\models\Option;
- class VideoAnalyze
- {
- private $baseApi = "https://www.345api.cn/api/";
- private $key;
- public $store_id;
- public $url = "jiexi/get";
- public function __construct() {
- }
- public function videoAnalyzeCurl($url = '') {
- if (!$url) {
- return json_encode([
- 'code' => 1,
- 'msg' => '请填写链接'
- ]);
- }
- $store_id = $this->store_id ?? 0;
- $key = Option::get('video_analyze_345', $store_id, 'saas', '')['value'];
- $this->key = $key;
- $api = $this->baseApi . $this->url . '?key=' . $this->key . '&url=' . urlencode($url);
- $key = $this->key;
- return cloud_get($api);
- }
- }
|