知道请求链接是否从电子邮件帐户访问[关闭]

that may not be possible, but, please let me ask it!

is there a way to know if an url is been requested form an email account?

the thing is : a got a page who can only be accessed by giving a random CAPTCHA CODE. but i wan to make the same page be accesible from an email account.

so my question is , if it's possible to know if the requested url is coming from an email account.

Do you mean if it's coming from an e-mail?
In that case, you could do something like this

<a href="http://example.com/page?o=email">Click here to go to our website</a>

The origins could also be saved in a table, so it wasn't obvious what it was. For example origin #1 could be email.

<a href="http://example.com/page?o=1">Click here to go to our website</a>

And then get the origin

<?php
switch($_GET['o']) {
  case 'email':
     // Origin is email
  break;

  case '1': // this would probably interfere with true, hence the quotes
     // Origin is email
  break;

  default:
    // No origin; Captcha
  break;
}
?>

For a more secure solution, it could be an authorization key, generated when the email was sent and afterwards compared to the one in the link.

<?php // The page sending the mail
$key = md5(time()); // Or something else, maybe shorten it to fit better in the url

  // Save the key in a table

mail(); // Mail with unique link with ?o=$key in the end
?>

<?php // The page
if(isset($_GET['o'])) {
  // Check if the key exists in the table and delete it because it is used.
}
?>