Copied! Copy Stacktrace Search Stackoverflow Search Google Exception

w88优德 安卓下载-w88下载-优德w88ios

Client error: `GET http://taobaoapi.ffquan.cn/get-rank-goods-cat?client_from=www` resulted in a `403 Forbidden` response

  • 1. in /data/home/www/dtk_php_video/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php at line 113
    104105106107108109110111112113114115116117118119120121122
                $response->getReasonPhrase()
            );
     
            $summary = static::getResponseBodySummary($response);
     
            if ($summary !== null) {
                $message .= ":\n{$summary}\n";
            }
     
            return new $className($message, $request, $response, $previous, $ctx);
        }
     
        /**
         * Get a short summary of the response
         *
         * Will return `null` if the response is not printable.
         *
         * @param ResponseInterface $response
         *
    
  • 2. in /data/home/www/dtk_php_video/vendor/guzzlehttp/guzzle/src/Middleware.php at line 65 – GuzzleHttp\Exception\RequestException::create(GuzzleHttp\Psr7\Request, GuzzleHttp\Psr7\Response)
    59606162636465666768697071
                    return $handler($request, $options)->then(
                        function (ResponseInterface $response) use ($request) {
                            $code = $response->getStatusCode();
                            if ($code < 400) {
                                return $response;
                            }
                            throw RequestException::create($request, $response);
                        }
                    );
                };
            };
        }
     
    
  • 3. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 203 – GuzzleHttp\Middleware::GuzzleHttp\{closure}(GuzzleHttp\Psr7\Response)
    197198199200201202203204205206207208209
            if ($promise->getState() !== self::PENDING) {
                return;
            }
     
            try {
                if (isset($handler[$index])) {
                    $promise->resolve($handler[$index]($value));
                } elseif ($index === 1) {
                    // Forward resolution values as-is.
                    $promise->resolve($value);
                } else {
                    // Forward rejections down the chain.
                    $promise->reject($value);
    
  • 4. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 156 – GuzzleHttp\Promise\Promise::callHandler(1, GuzzleHttp\Psr7\Response, [GuzzleHttp\Promise\Promise, Closure, null])
    150151152153154155156157158159160161162
            // it in the task queue using the correct ID.
            if (!method_exists($value, 'then')) {
                $id = $state === self::FULFILLED ? 1 : 2;
                // It's a success, so resolve the handlers in the queue.
                queue()->add(static function () use ($id, $value, $handlers) {
                    foreach ($handlers as $handler) {
                        self::callHandler($id, $value, $handler);
                    }
                });
            } elseif ($value instanceof Promise
                && $value->getState() === self::PENDING
            ) {
                // We can just merge our handlers onto the next promise.
    
  • 5. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/TaskQueue.php at line 47 – GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
    41424344454647484950515253
        }
     
        public function run()
        {
            /** @var callable $task */
            while ($task = array_shift($this->queue)) {
                $task();
            }
        }
     
        /**
         * The task queue will be run and exhausted by default when the process
         * exits IFF the exit is not the result of a PHP E_ERROR error.
    
  • 6. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 246 – GuzzleHttp\Promise\TaskQueue::run(true)
    240241242243244245246247248249250251252
     
        private function invokeWaitFn()
        {
            try {
                $wfn = $this->waitFn;
                $this->waitFn = null;
                $wfn(true);
            } catch (\Exception $reason) {
                if ($this->state === self::PENDING) {
                    // The promise has not been resolved yet, so reject the promise
                    // with the exception.
                    $this->reject($reason);
                } else {
    
  • 7. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 223 – GuzzleHttp\Promise\Promise::invokeWaitFn()
    217218219220221222223224225226227228229
     
        private function waitIfPending()
        {
            if ($this->state !== self::PENDING) {
                return;
            } elseif ($this->waitFn) {
                $this->invokeWaitFn();
            } elseif ($this->waitList) {
                $this->invokeWaitList();
            } else {
                // If there's not wait function, then reject the promise.
                $this->reject('Cannot wait on a promise that has '
                    . 'no internal wait function. You must provide a wait '
    
  • 8. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 267 – GuzzleHttp\Promise\Promise::waitIfPending()
    261262263264265266267268269270271272273
        {
            $waitList = $this->waitList;
            $this->waitList = null;
     
            foreach ($waitList as $result) {
                while (true) {
                    $result->waitIfPending();
     
                    if ($result->result instanceof Promise) {
                        $result = $result->result;
                    } else {
                        if ($result->result instanceof PromiseInterface) {
                            $result->result->wait(false);
    
  • 9. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 225 – GuzzleHttp\Promise\Promise::invokeWaitList()
    219220221222223224225226227228229230231
        {
            if ($this->state !== self::PENDING) {
                return;
            } elseif ($this->waitFn) {
                $this->invokeWaitFn();
            } elseif ($this->waitList) {
                $this->invokeWaitList();
            } else {
                // If there's not wait function, then reject the promise.
                $this->reject('Cannot wait on a promise that has '
                    . 'no internal wait function. You must provide a wait '
                    . 'function when constructing the promise to be able to '
                    . 'wait on a promise.');
    
  • 10. in /data/home/www/dtk_php_video/vendor/guzzlehttp/promises/src/Promise.php at line 62 – GuzzleHttp\Promise\Promise::waitIfPending()
    56575859606162636465666768
        {
            return $this->then(null, $onRejected);
        }
     
        public function wait($unwrap = true)
        {
            $this->waitIfPending();
     
            $inner = $this->result instanceof PromiseInterface
                ? $this->result->wait($unwrap)
                : $this->result;
     
            if ($unwrap) {
    
  • 11. in /data/home/www/dtk_php_video/vendor/guzzlehttp/guzzle/src/Client.php at line 183 – GuzzleHttp\Promise\Promise::wait()
    177178179180181182183184185186187188189
         * @return ResponseInterface
         * @throws GuzzleException
         */
        public function request($method, $uri = '', array $options = [])
        {
            $options[RequestOptions::SYNCHRONOUS] = true;
            return $this->requestAsync($method, $uri, $options)->wait();
        }
     
        /**
         * Get a client configuration option.
         *
         * These options include default request options of the client, a "handler"
    
  • 12. in /data/home/www/dtk_php_video/helper/GoTaobaoHelper.php at line 141 – GuzzleHttp\Client::request('GET', 'http://taobaoapi.ffquan.cn/get-r...', ['stream' => true, 'synchronous' => true, 'timeout' => 5, 'headers' => ['User-Agent' => 'Mozilla/5.0+(compatible;+Baidusp...']])
    135136137138139140141142143144145146147
                $client = new \GuzzleHttp\Client();
                $res = $client->request('GET', $url, [
                    'stream' => true,
                    'synchronous' => true,
                    'timeout' => 5,
                    "headers" => [
                        "User-Agent" => $_SERVER["HTTP_USER_AGENT"]??""
                    ]
                ]);
     
                $body = $res->getBody()->getContents();
                if(empty($body)){
                    Yii::log(json_encode($body), 'error', 'go1_用户配置表user_config_'.$url);
    
  • 13. in /data/home/www/dtk_php_video/helper/GoTaobaoHelper.php at line 115 – app\helper\GoTaobaoHelper::getGuzzleHttp('http://taobaoapi.ffquan.cn/get-r...')
    109110111112113114115116117118119120121
                    $url .= http_build_query($params);
                else if ($params != "") {
                    $url .= "&" . trim($params, "?&");
                }
            }
     
            $data = self::getGuzzleHttp($url);
            $num = empty($_REQUEST['debug_num'])?1:$_REQUEST['debug_num'];//这行代码控制统一进程有多个调试时显示第几个接口调试数据
            if($this->debug){
                if(($num==$this->debug_num)){
                    var_dump($url);
                    var_dump($data);
                }
    
  • 14. in /data/home/www/dtk_php_video/helper/GoTaobaoHelper.php at line 53 – app\helper\GoTaobaoHelper::GoApi('get-rank-goods-cat', ['client_from' => 'www'])
    47484950515253545556575859
        /**
         * 获取商品分类
         */
        public function getGoodsCidData()
        {
            $api = 'get-rank-goods-cat';
            $data = $this->GoApi($api,[]);
            return isset($data)?$data:[];
        }
     
     
        /**
         * 获取达人分类
    
  • 15. in /data/home/www/dtk_php_video/controllers/IndexController.php at line 25 – app\helper\GoTaobaoHelper::getGoodsCidData()
    19202122232425262728293031
     
     
        //带货精选 + 搜索
        public function actionVideoList(){
            $this->title = '带货精选 - 大淘客 - 带货短视频数据分析平台';
            $goapi = New GoTaobaoHelper();
            $cid_all = $goapi->getGoodsCidData();
            $cid_all_name = array_column($cid_all,'name','id');
            $hot_label = GlobalHelper::GetHotLabel();
            $get["cid"] = intval(Yii::$app->request->get('cid', -1));
            !isset($cid_all_name[$get["cid"]]) && $get["cid"] = -1;
     
            $get["sa1"] = trim(Yii::$app->request->get('sa1', '')); //search_after
    
  • 16. app\controllers\IndexController::actionVideoList()
  • 17. in /data/home/www/dtk_php_video/vendor/yiisoft/yii2/base/InlineAction.php at line 57 – call_user_func_array([app\controllers\IndexController, 'actionVideoList'], [])
    515253545556575859
            $args = $this->controller->bindActionParams($this, $params);
            Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
    
  • 18. in /data/home/www/dtk_php_video/vendor/yiisoft/yii2/base/Controller.php at line 157 yii\base\InlineAction::runWithParams([])
    151152153154155156157158159160161162163
            }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
    
  • 19. in /data/home/www/dtk_php_video/vendor/yiisoft/yii2/base/Module.php at line 528 yii\base\Controller::runAction('video-list', [])
    522523524525526527528529530531532533534
            $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                if ($oldController !== null) {
                    Yii::$app->controller = $oldController;
                }
     
                return $result;
            }
    
  • 20. in /data/home/www/dtk_php_video/vendor/yiisoft/yii2/web/Application.php at line 103 yii\base\Module::runAction('index/video-list', [])
    979899100101102103104105106107108109
                $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::debug("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                }
     
                $response = $this->getResponse();
                if ($result !== null) {
    
  • 21. in /data/home/www/dtk_php_video/vendor/yiisoft/yii2/base/Application.php at line 386 yii\web\Application::handleRequest(yii\web\Request)
    380381382383384385386387388389390391392
        {
            try {
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
    
  • 22. in /data/home/www/dtk_php_video/web/index.php at line 12 yii\base\Application::run()
    6789101112
     
    require __DIR__ . '/../vendor/autoload.php';
    require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
     
    $config = require __DIR__ . '/../config/web.php';
     
    (new yii\web\Application($config))->run();
    
  •