Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开发了一个组件,我需要确保它的安全,因为它不应再用于购买该组件的多个 URL。可以通过 PHP Curl 代码或任何其他方式来限制用户吗?
是的,你可以使用
$_SERVER['HTTP_REFERER'] ,要检查引用者还使用 CURL 传递唯一键,因此您将通过 curl 获得 $_SERVER['HTTP_REFERER'] + 唯一键,如果允许处理它...
<?php echo $_SERVER['HTTP_REFERER']; // you will get the referrer and please check using an IF clasuse ?>