Function __global->create_data_mash

Definitions

sources/downloads2.php

  • Create a data-mash from the file at a URL. This is data useful for the search engine.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$url URLPATH No No required parameter N/A N/A The URL to make a data-mash of, or a filename if $data isn't blank
$data ?string No No Null N/A N/A Data (null: use URL)
$extension ?ID_TEXT No No Null N/A N/A File extension (null: get from URL)
$direct_path boolean No No False N/A N/A Whether a direct file path was given instead of a URL

Returns

  • The data-mash
  • Type: LONG_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Create a data-mash from the file at a URL. This is data useful for the search engine.
 *
 * @param  URLPATH $url The URL to make a data-mash of, or a filename if $data isn't blank
 * @param  ?string $data Data (null: use URL)
 * @param  ?ID_TEXT $extension File extension (null: get from URL)
 * @param  boolean $direct_path Whether a direct file path was given instead of a URL
 * @return LONG_TEXT The data-mash
 */

function create_data_mash(string $url, ?string $data = null, ?string $extension = null, bool $direct_path = false) : string