17.04.2017, 19:35
Quote:
The website is probably behind cloudflare or another reverse proxy which authenticates clients and tries to prevent bots. You really should learn how to make a service2service api. If using cloudflare in default configuration it only allows human2service interactions.
You can also solve this by using the real ip of the webserver and getting the file directly, avoiding CF or any other reverse proxies. If you are on a shared hosting you need to create a static/override DNS entry in your DNS Server (where you host your sa-mp server) which will override the global DNS of your server machine. If you are on a shared server hosting and a shared website hosting, you need to create a subdomain which is not protected by cloudflare but directly uses/points to your webhosting. you then use that domain as an api url where you do only message/request authentication (e.g. checking an api key in a POST variable which you verify in your php script). If you are using someone else's website files on your server, ask the owner of that website to provide you a service api! There's a reason they're behind cloudflare. |