Cloudflare basically doing their job, so looking for suggestions.
What steps have you taken to resolve the issue?
So. I’m playing around with a website, as a various server monitor. Basically to pull info from different community games API ( Like FiveM), and display it on my testing website.
I did try implementing a restriction on how often to apply a request to not put my system on cloudflare radar not to get blocked again, but unfortunatly it happened again.
I’m building my website in PHP.
As mentioned before, i got blocked once, but ended up using proxy to bypass it.
I’m not building the website for any malicious reasons, just one way of learning on building PHP websites and maybe sometime in the future launching a project like that.
Not sure if it’s the right category, never really played around with cloudflare, so apologies for that in advance.
What are the steps to reproduce the issue?
This is the error message.
2024-11-03 19:55:25 - Attempting to fetch server details from URL: https://servers-frontend.fivem.net/api/servers/single/[server ID]
2024-11-03 19:55:25 - API Response: Just a moment…*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{display:flex;flex-direction:column;height:100vh;min-height:100vh}.main-content{margin:8rem auto;max-width:60rem;padding-left:1.5rem}@media (width <= 720px){.main-content{margin-top:4rem}}.h2{font-size:1.5rem;font-weight:500;line-height:2.25rem}@media (width <= 720px){.h2{font-size:1.25rem;line-height:1.5rem}}#challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+);background-repeat:no-repeat;background-size:contain;padding-left:34px}@media (prefers-color-scheme:dark){body{background-color:#222;color:#d9d9d9}}
Enable JavaScript and cookies to continue
2024-11-03 19:55:25 - Invalid or incomplete data in API response. Data object missing or malformed.
For people like me who like it organized, this is the error code :
2024-11-03 19:55:25 - Attempting to fetch server details from URL: https://servers-frontend.fivem.net/api/servers/single/[server ID]
2024-11-03 19:55:25 - API Response: Just a moment…*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{display:flex;flex-direction:column;height:100vh;min-height:100vh}.main-content{margin:8rem auto;max-width:60rem;padding-left:1.5rem}@media (width <= 720px){.main-content{margin-top:4rem}}.h2{font-size:1.5rem;font-weight:500;line-height:2.25rem}@media (width <= 720px){.h2{font-size:1.25rem;line-height:1.5rem}}#challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+);background-repeat:no-repeat;background-size:contain;padding-left:34px}@media (prefers-color-scheme:dark){body{background-color:#222;color:#d9d9d9}}
Enable JavaScript and cookies to continue
2024-11-03 19:55:25 - Invalid or incomplete data in API response. Data object missing or malformed.
May I ask for any more details to share here wit us of the blocked request you experience from the Security tab → Events?
Once you find them, click on a particular one to find more details about it (user-agent, IP, HTTP version …). If yes, could you share some details which service was triggered that blocked you?
It might be Bot Fight Mode or some other, or you’ve got API Shield feature enabled?
Hi fritex.
Thanks for the quick response, wasn’t expecting that on a Sunday evening haha.
So first i should probably clarify.
My website is hosten on a VPS.
And my website is not registered/protected by cloudflare.
It’s the API’s website where i get the data from is.
I am looking for suggestions on how to properly avoid getting blocked again, as i could use proxy again, but to be honest it just seems like a hastle, that doesn’t permenantly fixes the issue.
Have you got contacts of them? If so, might be good to write them to allowlist your VPS IP address if you’re sending and fetching those requests from legally (in some respectable time-frame like every X minute or so, not every X seconds)
Otherwise, try using cURL() for PHP if not already, change the User-Agent, etc.
How about using a headless-browser if so?
I am afraid it’ll be challenging to bypass Cloudflare’s security mechanism, if not impossible.
Depending what kind of data you do have from them, you could try via Cloudflare Worker to fetch the content (might be billed for such stuff, but …).
So for the contacts, as you can see, i contacted them, but no reply to this day:
I might look into using cURL, will have to do some research, as i am not a developer, but simply a rookie playing around with stackeroverflow, git, chatgpt haha