Check for captcha infidelity is as follows:
if($_POST['captcha_code'] != $_SESSION['csession_code']) { echo 'Неверный код безопасности'; }
All is well. But the problem is, for example, if you send a direct PHP request to my site from another site, then the captcha will easily manage, as with a direct request from another site the session is not seen . It turns out something like this when sending a request from another site:
''! = ''
How to solve this problem?