0) { $postId = $responseData['statuses'][0]['id']; echo $postId; } else { echo "No post found or no matching post for the given URL."; } } // Get the `url` parameter from the query string if (isset($_GET['url']) && !empty($_GET['url'])) { $searchUrl = $_GET['url']; // Get the URL from the query string } else { echo "Error: No URL provided in query string."; exit; } // Your Mastodon instance URL and API Key $apiKey = "zV0asC4bcomUuS8pIXHNDJZ4R8"; // Replace with your actual API key $pbUrl = "https://mas.to"; // Replace with your Mastodon instance URL // Call the search function with the provided URL searchPostWithAPIKey($apiKey, $pbUrl, $searchUrl); ?>