Secure API calls with AJAX and PHP to 3rd party API

前端 未结 6 494
小鲜肉
小鲜肉 2021-01-11 18:02

I want to make GET, POST & PUT calls to a 3rd party API and display the response on the client side via AJAX. The API calls require a token, but I need to keep that toke

6条回答
  •  死守一世寂寞
    2021-01-11 18:29

    If you use cUrl that you must to protect is your server. The way I personally use is the Google reCaptcha that is sure made for arranging problems like yours. Very well explained the integration in client and server sides step by step here. https://webdesign.tutsplus.com/tutorials/how-to-integrate-no-captcha-recaptcha-in-your-website--cms-23024 With this way you don't need to change anything in your virtualhost files and any apache configurations.

提交回复
热议问题