hcgcloud / pterodactyl-sdk

Pterodactyl Panel PHP SDK/API wrapper
https://hcgcloud.github.io/pterodactyl-sdk-docs/
MIT License
27 stars 25 forks source link

Curl Response says Cloudflare captcha loading #39

Closed SalmanYamin1992 closed 2 years ago

SalmanYamin1992 commented 3 years ago

Hello I am using this SDK to send a power action to my server. I have made the php file and when I execute it from my ubuntu machine using php api.php it works fine. But when I upload the project to any web server and execute it from there, It gives me a cloudflare screen with a loading sign at the center. And at the top left corner there is "Please enable cookies". I am sorry I am very new to php so I am wondering if this is a problem with the web-hosting company or with my project.

[Note: If I use it for a different pterodactyl site, then both ubuntu machine and website host works perfectly. So I am guessing I have to somehow bypass the HCaptcha. Is there some way I can send HCaptcha accessibility cookie when sending the post request with your api?]

tyson239 commented 3 years ago

Hi, you can try to create a Page Rule on Cloudflare. image

SalmanYamin1992 commented 3 years ago

I think I didn't state the problem properly. I don't own the domain of the pterodactyl hosted company. I am just a client with a client API key

SalmanYamin1992 commented 3 years ago

ok correction: [I can only achieve what I am trying to do if i run php api.php from google cloud shell. But if I try to do it through my personal website or through my windows machine, it fails and gives me a cloudflare landing page.]