小编Kar*_* Nk的帖子

标题中的AuthKey

所以我的客户端需要一个使用PHP的REST API,它根据URL参数的条件提供输出

所以现在基本上有三个URL,目前需要它们完成.

他们是

localhost/newapi/client/<AuthKey> - for authorizing

localhost/newapi/client/<clientid>/categories/ - to get all the categories

localhost/newapi/client/<clientid>/categories/<categoryid> - to get all items in a category
Run Code Online (Sandbox Code Playgroud)

用.htaccess用于花哨的URL

所以现在他要求将AuthKey添加到HTTP头而不是URL.因此,必须将AuthKey作为头部传递,其余部分作为URL参数传递

所以我的问题是如何做到这一点.以及如何从请求中检索AuthKey?

欢迎任何有关此问题的教程或评论

php authentication rest .htaccess

6
推荐指数
1
解决办法
3345
查看次数

标签 统计

.htaccess ×1

authentication ×1

php ×1

rest ×1