home
/
aioutajg
/
test.imgccr.com
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
[DIR] Before Install
N/A
[DIR] composer_home
N/A
[DIR] vendor
N/A
0u.php
37.68 KB
Rename
Delete
1.install.php
1.69 KB
Rename
Delete
2.run_composer.php
643 bytes
Rename
Delete
Before Install.zip
3.10 KB
Rename
Delete
composer.json
67 bytes
Rename
Delete
composer.lock
46.59 KB
Rename
Delete
composer.phar
2.92 MB
Rename
Delete
index.php
773 bytes
Rename
Delete
robots.txt
26 bytes
Rename
Delete
upload.php
2.36 KB
Rename
Delete
<?php require 'vendor/autoload.php'; // Ensure you've installed google/apiclient use Google\Client; use Google\Service\Indexing as Google_Service_Indexing; class BulkIndexingTool { private $client; private $service; public function __construct($jsonKeyFilePath) { $this->client = new Client(); $this->client->setAuthConfig($jsonKeyFilePath); $this->client->addScope('https://www.googleapis.com/auth/indexing'); $this->service = new Google_Service_Indexing($this->client); } public function indexUrls(array $urls) { $urls = array_slice($urls, 0, 200); // Limit to 200 URLs foreach ($urls as $url) { $this->indexUrl($url); } } private function indexUrl($url) { $content = new Google_Service_Indexing_UrlNotification(); $content->setUrl($url); $content->setType("URL_UPDATED"); try { $response = $this->service->urlNotifications->publish($content); echo "Successfully submitted: $url" . PHP_EOL; } catch (Exception $e) { echo 'Error submitting: ' . $url . ' - ' . $e->getMessage() . PHP_EOL; } } } // Handle file upload if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_FILES['jsonFile']) && $_FILES['jsonFile']['error'] === UPLOAD_ERR_OK) { $jsonFile = $_FILES['jsonFile']['tmp_name']; $fileType = mime_content_type($jsonFile); if ($fileType === 'application/json') { // Ensure URLs are posted and valid if (!empty($_POST['urls'])) { $urls = array_filter(array_map('trim', explode(PHP_EOL, $_POST['urls'])), function($url) { return filter_var($url, FILTER_VALIDATE_URL); }); if (count($urls) > 200) { echo 'Error: You can submit a maximum of 200 URLs at a time.'; exit; } $indexingTool = new BulkIndexingTool($jsonFile); $indexingTool->indexUrls($urls); } else { echo 'Error: Please provide at least one valid URL.'; } } else { echo 'Error: Invalid JSON file format.'; } } else { echo 'Error: Please upload a valid Google service account JSON file.'; } }
Save