From 1775d83a4784ee20f35f45c3fa35c60253bca43a Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 24 Apr 2024 01:05:19 +0300 Subject: [PATCH] update nex-php api --- src/Entity/Tab/Page.php | 47 ++++++----------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/src/Entity/Tab/Page.php b/src/Entity/Tab/Page.php index 42d4185f..721f2cc7 100644 --- a/src/Entity/Tab/Page.php +++ b/src/Entity/Tab/Page.php @@ -824,53 +824,18 @@ class Page // Track response time $start = microtime(true); - // Init custom resolver - $host = null; - - if ($this->config->resolver->enabled) - { - $address = new \Yggverse\Net\Address( - $url - ); - - $name = $address->getHost(); - - if (!$host = $this->dns->get($name)) - { - $resolve = new \Yggverse\Net\Resolve( - $this->config->resolver->request->record, - $this->config->resolver->request->host, - $this->config->resolver->request->timeout, - $this->config->resolver->result->shuffle - ); - - $resolved = $resolve->address( - $address - ); - - if ($resolved) - { - $host = $resolved->getHost(); + // @TODO custom resolver support - $this->dns->set( - $name, - $host - ); - } - } - } + $client = new \Yggverse\Nex\Client; - $request = new \Yggverse\Nex\Client\Request( - $url, - $host + $response = $client->request( + $url ); - $raw = $request->getResponse(); - $end = microtime(true); $this->content->set_markup( - $raw // @TODO + $response ); $this->setTitle( @@ -911,7 +876,7 @@ class Page '-', number_format( mb_strlen( - $raw + $response ) ), round(