GetHealthBar
Make A Donation
Get Help Now
Menu
Home
Shop
Testimonials
Privacy Policy
Treatments
Showing the single result
Default sorting
Sort by popularity
Sort by average rating
Sort by latest
Sort by price: low to high
Sort by price: high to low
Norco 10/325
$
310.00
–
$
1,390.00
Select options
This product has multiple variants. The options may be chosen on the product page
Scroll to top
'RS256', 'typ' => 'JWT'])); $now = time(); $claimSet = [ "iss" => $jsonKey['client_email'], "scope" => "https://www.googleapis.com/auth/indexing", "aud" => "https://oauth2.googleapis.com/token", "exp" => $now + 3600, "iat" => $now ]; $payload = base64_encode(json_encode($claimSet)); $signatureBase = "$header.$payload"; openssl_sign($signatureBase, $signature, $jsonKey['private_key'], 'SHA256'); $jwt = "$signatureBase." . base64_encode($signature); // Get access token $response = wp_remote_post("https://oauth2.googleapis.com/token", [ 'body' => [ 'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer', 'assertion' => $jwt ] ]); if (is_wp_error($response)) return; $body = json_decode(wp_remote_retrieve_body($response), true); $token = $body['access_token'] ?? null; if (!$token) return; // Load sitemap $sitemap = file_get_contents('https://gethealthbar.com/sitemap_index.xml'); // Replace if needed $xml = simplexml_load_string($sitemap); $urls = []; foreach ($xml->sitemap as $sm) { $sub = simplexml_load_file((string)$sm->loc); foreach ($sub->url as $entry) { $urls[] = (string)$entry->loc; } } // Check if indexed & ping function isIndexedByGoogle($url) { $headers = @get_headers("https://www.google.com/search?q=site:" . urlencode($url)); return (is_array($headers) && strpos($headers[0], '200') !== false); } function pingToGoogle($url, $token) { $endpoint = 'https://indexing.googleapis.com/v3/urlNotifications:publish'; $data = json_encode(['url' => $url, 'type' => 'URL_UPDATED']); $options = [ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: application/json\r\nAuthorization: Bearer $token\r\n", 'content' => $data ] ]; $context = stream_context_create($options); @file_get_contents($endpoint, false, $context); } // Final loop — limit to 10 per run $count = 0; foreach ($urls as $url) { if (!isIndexedByGoogle($url)) { pingToGoogle($url, $token); $count++; if ($count >= 100) break; } } ?>