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.
}
?>