API Endpoint POST Request Intercepted by Anti-Bot Page (sgvstudio.great-site.net)

Hello,

I am having a persistent issue with my API endpoint being blocked or intercepted by what appears to be the hosting provider’s anti-bot/DDoS protection script.

1. Goal:

I am running a tracking data API endpoint (data_receiver.php) that is designed to receive raw JSON data via a POST request and store it in the MySQL database.

2. API Endpoint URL:

https://sgvstudio.great-site.net/projects/sgv-tracker-1759840484/api/data_receiver.php

3. Observed Problem:

When I send a POST request to this URL from a client application (or even using a server-side cURL request run from another PHP file on the same hosting account), the endpoint does not return the expected JSON response (e.g., {“status”:“success”, “message”:“…”}).

Instead, the response body contains a large block of HTML/JavaScript, which appears to be a security challenge page:

<html><body><script type="text/javascript" src="/aes.js" ></script><script>...</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html>


This HTML response is what breaks my client application, as it expects a JSON object.

4. Troubleshooting Steps Taken:

  • The PHP code for data_receiver.php is confirmed to be working perfectly when run on a local machine (localhost).

  • The API accepts raw JSON data directly (no Base64 encoding).

  • The Content-Type: application/json header is correctly sent with the POST request.

  • I attempted to replicate the request using an internal server-side cURL request (PHP-to-PHP on the same account) to rule out external client issues, and the same HTML challenge page was returned.

5. Request:

Is there a way to whitelist this specific API endpoint URL from the aggressive anti-bot/DDoS checks, or is there a specific folder/subdomain path that is known to allow raw API traffic without intervention?

This is a critical function for my application, and I would appreciate any guidance on how to allow machine-to-machine traffic to reach this script.

Thank you for your help!

Expected, you cannot host APIs here.

9 Likes

Sorry but you cant create api in infinityfree hosting, use other services like render or wasmer to make your api

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.