<?php $api_endpoint = 'https://api.indexnow.org/indexnow'; $data = json_encode([ 'host' => 'example.com', 'key' => 'your-api-key', 'keyLocation' => 'https://example.com/api-key.txt', 'urlList' => ['https://example.com/page1', 'https://example.com/page2'] ]); $ch = curl_init($api_endpoint); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Content-Length: ' . strlen($data) ]); $response = curl_exec($ch); curl_close($ch); echo $response;