__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Nextend\Framework;
use Exception;
use Joomla\CMS\Http\Http;
use Nextend\Framework\Misc\Base64;
use Nextend\Framework\Misc\HttpClient;
use Nextend\Framework\Notification\Notification;
use Nextend\Framework\Platform\Platform;
use Nextend\Framework\Request\Request;
use Nextend\Framework\Url\Url;
class Api {
private static $api = 'https://api.nextendweb.com/v1/';
public static function getApiUrl() {
return self::$api;
}
public static function api($posts, $returnUrl = false) {
$api = self::getApiUrl();
$posts_default = array(
'platform' => Platform::getName()
);
$posts = $posts + $posts_default;
if ($returnUrl) {
return $api . '?' . http_build_query($posts, '', '&');
}
$request = wp_remote_post($api, array(
'timeout' => 20,
'body' => $posts
));
if (is_wp_error($request)) {
foreach ($request->get_error_messages() as $errorMessage) {
Notification::error($errorMessage);
}
return null;
} else {
$data = wp_remote_retrieve_body($request);
$headers = wp_remote_retrieve_headers($request);
$contentType = $headers['content-type'];
}
switch ($contentType) {
case 'text/html; charset=UTF-8':
Notification::error(sprintf('Unexpected response from the API.<br>Contact us ([email protected]) with the following log:') . '<br><textarea style="width: 100%;height:200px;font-size:8px;">' . Base64::encode($data) . '</textarea>');
return array(
'status' => 'ERROR_HANDLED'
);
break;
case 'application/json':
return json_decode($data, true);
}
return $data;
}
private static function parseHeaders(array $headers, $header = null) {
$output = array();
if ('HTTP' === substr($headers[0], 0, 4)) {
list(, $output['status'], $output['status_text']) = explode(' ', $headers[0]);
unset($headers[0]);
}
foreach ($headers as $v) {
$h = preg_split('/:\s*/', $v);
if (count($h) >= 2) {
$output[strtolower($h[0])] = $h[1];
}
}
if (null !== $header) {
if (isset($output[strtolower($header)])) {
return $output[strtolower($header)];
}
return null;
}
return $output;
}
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Acl | Folder | 0775 |
|
|
| Application | Folder | 0775 |
|
|
| Asset | Folder | 0775 |
|
|
| Browse | Folder | 0775 |
|
|
| Cache | Folder | 0775 |
|
|
| Content | Folder | 0775 |
|
|
| Controller | Folder | 0775 |
|
|
| Data | Folder | 0775 |
|
|
| Database | Folder | 0775 |
|
|
| FastImageSize | Folder | 0775 |
|
|
| Filesystem | Folder | 0775 |
|
|
| Font | Folder | 0775 |
|
|
| Form | Folder | 0775 |
|
|
| Image | Folder | 0775 |
|
|
| Localization | Folder | 0775 |
|
|
| Misc | Folder | 0775 |
|
|
| Model | Folder | 0775 |
|
|
| Notification | Folder | 0775 |
|
|
| Parser | Folder | 0775 |
|
|
| Pattern | Folder | 0775 |
|
|
| Platform | Folder | 0775 |
|
|
| Request | Folder | 0775 |
|
|
| ResourceTranslator | Folder | 0775 |
|
|
| Response | Folder | 0775 |
|
|
| Router | Folder | 0775 |
|
|
| Session | Folder | 0775 |
|
|
| Style | Folder | 0775 |
|
|
| Translation | Folder | 0775 |
|
|
| Url | Folder | 0775 |
|
|
| View | Folder | 0775 |
|
|
| Visual | Folder | 0775 |
|
|
| WordPress | Folder | 0775 |
|
|
| Api.php | File | 2.55 KB | 0775 |
|
| Cast.php | File | 277 B | 0775 |
|
| Framework.php | File | 412 B | 0775 |
|
| PageFlow.php | File | 590 B | 0775 |
|
| Plugin.php | File | 1.44 KB | 0775 |
|
| Sanitize.php | File | 31.48 KB | 0775 |
|
| Settings.php | File | 1.9 KB | 0775 |
|