Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Name
- Requests
- Errors (%)
- Latency, median (ms)
- Latency, 95% (ms)
- Indexing API 1 0 393 511
- $url='https://www.yuvajobs.com/government-jobs/manit-maulana-azad-national-institute-of-technology-recruitment-6993.html';
- $client = new Google_Client();
- // service_account_file.json is the private key that you created for your service account.
- $client->setAuthConfig('service_account_file.json');
- $client->addScope('https://www.googleapis.com/auth/indexing');
- // Get a Guzzle HTTP Client
- $httpClient = $client->authorize();
- $endpoint = 'https://indexing.googleapis.com/v3/urlNotifications:publish';
- $content = "{
- "url": "".$url."",
- "type": "URL_UPDATED"
- }";
- $response = $httpClient->post($endpoint, [ 'body' => $content ]);
- $status_code = $response->getStatusCode();
- print_r($status_code).' : ';
Add Comment
Please, Sign In to add comment