uawdijnntqw1x1x1
IP : 216.73.216.231
Hostname : 213-108-241-110.cprapid.com
Kernel : Linux 213-108-241-110.cprapid.com 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
digilove
/
public_html
/
f7525
/
..
/
assets
/
..
/
plugins
/
content
/
aimyindexnow
/
notifier.php
/
/
<?php /* Copyright (c) 2022-2024 Aimy Extensions, Netzum Sorglos Software GmbH * * https://www.aimy-extensions.com/ * * License: GNU GPLv2, see LICENSE.txt within distribution and/or * http://www.aimy-extensions.com/software-license.html */ namespace Aimy\IndexNow; defined( '_JEXEC' ) or die(); use Joomla\CMS\Http\HttpFactory; use Joomla\CMS\Language\Text; use Joomla\CMS\Uri\Uri; abstract class Notifier { static private $endpoint = 'https://api.indexnow.org/indexnow'; const MAX_URLS_PER_POST = 10000; static public function submitSingleUrl( $contentUrl, $key ) { $url = self::$endpoint . sprintf( '?url=%s&key=%s', rawurlencode( $contentUrl ), $key ); $resp = HttpFactory::getHttp()->get( $url, array(), 5 ); if ( $resp->code !== 200 && $resp->code !== 202 ) { throw new \RuntimeException( Text::sprintf( 'AIMY_IN_ERR_HTTP_RESPONSE_X', $resp->code, self::getCause( $resp->code ) ) ); } return true; } static public function submitMultipleUrls( $contentUrls, $key ) { if ( ! count( $contentUrls ) ) { return 0; } $d = new \StdClass(); $d->host = Uri::getInstance()->getHost(); $d->key = $key; $d->urlList = array(); $offset = 0; do { $d->urlList = array_slice( $contentUrls, $offset, self::MAX_URLS_PER_POST ); $offset += count( $d->urlList ); $resp = HttpFactory::getHttp()->post( self::$endpoint, json_encode( $d ), array( 'Content-Type' => 'application/json; charset=utf-8' ) ); if ( $resp->code !== 200 && $resp->code !== 202 ) { throw new \RuntimeException( Text::sprintf( 'AIMY_IN_ERR_HTTP_RESPONSE_X', $resp->code, self::getCause( $resp->code ) ) ); } } while ( $offset < count( $contentUrls ) ); return $offset; } static private function getCause( $code ) { switch ( $code ) { case 400: return 'Bad request'; break; case 403: return 'Forbidden'; break; case 422: return 'Unprocessable entity'; break; case 429: return 'Too many requests'; break; } return 'Unknown'; } }
/home/digilove/public_html/f7525/../assets/../plugins/content/aimyindexnow/notifier.php