Function __global->get_bot_type

Definitions

sources/global3.php

  • Get the name of a webcrawler bot, or null if no bot detected.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$agent ?string No No Null N/A N/A User agent (null: read from environment)

Returns

  • Webcrawling bot name (null: not a bot)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the name of a webcrawler bot, or null if no bot detected.
 *
 * @param  ?string $agent User agent (null: read from environment)
 * @return ?string Webcrawling bot name (null: not a bot)
 */

function get_bot_type(?string $agent = null) : ?string