Free-Conversant Support / Conditional Macro: UserAgentIsEmailCollector
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Conditionals >> Web Server >> userAgentIsEmailCollector

Conditional Macro: userAgentIsEmailCollector

Operators:

  • no operators

Usage Notes

  • Tests to see if the software that requested the page is a known robot that collects email addresses for the purpose of sending Unsolicited Commercial Email to them (in other words, "SPAM-bots").

  • The "User-Agent" is the software running on the remote computer that requested the page.

  • A robot is an automated process running on a remote computer, that downloads web pages automatically.

  • There are many known robots, but there isn't a complete list of them anywhere. More are added all the time. If we don't recognize the "User-Agent" field that is sent with a request for a web page, then we assume that it is not a robot (since tests for robots are usually done to hide parts of pages, and you wouldn't want to hide something on the page simply because we didn't recognize someone's browser).

  • Not all robots are Email Collectors. If you want to test for any type of robot, use the userAgentIsRobot conditional.

  • In email and all other IO methods except the web server, this conditional macro always returns false.

Examples

This example would show line 1 only if the page were being requested by an Email Collector robot, and line 2 for any other request.

<!--#if condition="userAgentIsEmailCollector"-->

1. This is the line sent to the robots that we know are just collecting email addresses.

<!--#else-->

2. This is the line you'll see if you're viewing the page in a browser or email.

<!--#endIf-->

See the above code in action, here:

2. This is the line you'll see if you're viewing the page in a browser or email.
View in DG