GetStorageItem

Gets from the storage on the specified address an element which is correspond to specified key and ID.

Syntax

function GetStorageItem(aStorageURL: string; aStorageKey: string;
  aCryptoKey: string; aItemID: integer=-1; aStoragePass: string=''): TCSStorageItem;

Parameters

  • aStorageURL
    • type: string
    • functions: storage address
  • aStorageKey
    • type: string
    • functions: identification key
  • aCryptoKey
    • type: string
    • functions: key for encryption / decryption
  • aItemID
    • type: integer
    • functions: ID of the element to be obtained
  • aStoragePass
    • type: string
    • functions: password to access the storage

Returned value

Notes

  • If aItemID = -1, it will get a random element with the specified key

Examples

  1. //Get a random element from the storage
    var item:=GetStorageItem('http://mysite.ru/storage.php','requests','mycrypto');   
    //If the ID of the element is greater than zero, then send it's string to the log.
    if item.ItemID>0 then Log(item.Data);