Skip to content

Latest commit

 

History

History
161 lines (127 loc) · 3.27 KB

README.md

File metadata and controls

161 lines (127 loc) · 3.27 KB

Google Indexing

Indexing project written in PHP, using Google Indexing Api.

It is assumed that the steps at this address are applied. https://developers.google.com/search/apis/indexing-api/v3/prereqs

Screenshot at Apr 06 18-52-00

Using

Add Json File

Add your json file to the following directory.

assets/json/

Interface - Fill in the inputs.

Password: The name of your json file. (medialyra.com for medialyra.com.json)
Website address: The website you want indexed.


URL - For a single page:

Update:

http://localhost/api/?url=https://www.your-website.com
http://localhost/api/?method=1&url=https://www.your-website.com

Delete:

http://localhost/api/?method=2&url=https://www.your-website.com

URL - For multiple pages:

Update:

http://localhost/api/multiple?urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact
http://localhost/api/multiple?method=1&urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact

Delete:

http://localhost/api/multiple?method=2&urls[]=https://www.your-website.com&urls[]=https://www.your-website.com/contact

Installation

You can use Composer or simply Download the Release

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.

composer update

Enter the name of your JSON file:

Line 15 in app/controllers/home.php

...
$googleClient->setAuthConfig( 'YOUR_JSON_FILE_NANME.json' );
...

Line 15 in app/controllers/multiple.php

...
$googleClient->setAuthConfig( 'YOUR_JSON_FILE_NANME.json' );
...

If your PHP version is below 8

1- run the command below.

composer install --ignore-platform-reqs

2- Edit the following file as indicated:

Line 104 in vendor/psr/cache/src/CacheItemInterface.php

...
public function expiresAfter($time);
...

Line 30 in vendor/psr/log/src/LoggerInterface.php

...
public function emergency( $message, array $context = []);
...

Line 43 in vendor/psr/log/src/LoggerInterface.php

...
public function alert( $message, array $context = []);
...

Line 55 in vendor/psr/log/src/LoggerInterface.php

...
public function critical( $message, array $context = []);
...

Line 66 in vendor/psr/log/src/LoggerInterface.php

...
public function error( $message, array $context = []);
...

Line 79 in vendor/psr/log/src/LoggerInterface.php

...
public function warning( $message, array $context = []);
...

Line 89 in vendor/psr/log/src/LoggerInterface.php

...
public function notice( $message, array $context = []);
...

Line 101 in vendor/psr/log/src/LoggerInterface.php

...
public function info( $message, array $context = []);
...

Line 111 in vendor/psr/log/src/LoggerInterface.php

...
public function debug( $message, array $context = []);
...

Line 124 in vendor/psr/log/src/LoggerInterface.php

...
public function log($level, $message, array $context = []);
...